Archive for category WMI

PowerShell WMI Gather DNS settings for all Servers


A question came up on TechNet: “I am new to PowerShell and need a wmi script to query all the servers on my network for there dns settings and dump it out to a text file.  Would someone be able to help me get started?” This was a fairly long script, so I decided to […]

40 Comments

CopyToColorizedHTML–Script Editor Add-on for PowerGUI


I posted my script editor add-in on the PowerGUI Challenge folder http://powergui.org/kbcategory.jspa?categoryID=389 Based on Lee Holmes Set-ClipboardScript located here: http://www.leeholmes.com/blog/2009/02/03/more-powershell-syntax-highlighting/This script editor add-on will copy the current window to HTML ready to post on a blog or web page.This tool is found under Edit -> Copy As -> Colorized HTMLThe script will copy the entire […]

2 Comments

Remotely install ‘Win32_Product Class’ on Server 2003


In a previous post (PowerShell v2 Gather remote software inventory), I lamented the fact that Server 2003 does not include the Win32_Product class by default. (http://blogs.msdn.com/wmi/default.aspx) I was asked to install it on our 500 Server 2003 boxes via a script. I built a few test VM’s, and configured the Win32_Product class via “Add/Remove Windows […]

6 Comments

PowerShell Server Inventory Script


I was asked for my Server Inventory script on the newsgroup Microsoft.Public.Windows.PowerShell. This is my script, in a slightly compressed and sanitized version – Compressed as I stripped out Novell, Unix, and ESX Host logic, sanitized in that I don’t really have a domain contoso.com 😉 After the script, if you stick around, I will […]

2 Comments

Script remote DCOM / WMI access for a non admin


Recently I was asked to create an inventory process that would query active directory for servers and gather data on their hardware. I said “No problem”, fired up my trusty domain admin account and ran a bunch of WMI calls against the servers. Of course, for a script that is to be run on a […]

34 Comments