PowerShell Team

Automating the world one-liner at a time…

WMI Object Identifiers and Keys

Recently one of MVPs, Darren Mar-Elia (Group Policy Guru from SDMSoftware [which as a set of FREE PowerShell GP cmdlets HERE])  was working with our WMI type accelerators and got the following error: $ld = '\\sdmlaptop1\root\cimv2:Win32_LogicalDisk.Caption="C:"' $disk = [WMI] $ld Cannot convert value "\\sdmlaptop1\root\cimv2:...

Get-WmiHelp & Search-WmiHelp

Both PowerShell and Windows Management Instrumentation (WMI) are pretty incredible technologies that can do a lot of amazing things, but we're all human, and keeping an encyclopedic mental reference of all of these amazing things would give Good Will Hunting a headache.  For years, when I used WMI I ...

Displaying USB Devices using WMI

Over on MyItForum.com, I came upon a VBScript in a forum to find all the PNP entities associated with a USBController. I rewrote it in PowerShell and was pretty happy with the results so I thought I would share them. The first thing you need to understand is that the WMI class WIN32_USBControllerDevice describes the connection between USB ...

Automating Dell Battery Replacement Discovery

MOW has done it again.  Checkout his blog entry which shows how to leverage Windows PowerShell to automate determining which of the Dell laptops in your enterprise need to have their batteries replaced. http://mow001.blogspot.com/2006/08/powershell-has-my-dell-dangerous.html Totally cool.  Jeffrey Snover [MSFT]Windows ...

Encoding Operations Knowledge

One of the primary goals of Windows PowerShell is to encode operations knowledge.   Consider the example of finding out what domain role a computer plays.  If you look at the WMI class WIN32_COMPUTERSYSTEM, you'll see that it tells you this information:   PS> Get-WMiObject Win32_computerSystem |fl dom*Domain &...

Use of Wildcards in PowerShell Formating

MMS in San Diego was a great conference!  I met lots of customers that asked lots of great questions.  I was demonstrating PowerShell's WMI support when a customer asked about controlling the output.  The problem was that PowerShell was showing all the WMI System properties as well as the Object properties and that this wasn't ...