PowerShell for Windows Admins:

WMI


January 30, 2015  10:07 AM

Testing for a hotfix

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, Powershell, WMI

KB3000850 – the November roll up for Windows 2012 R2 contains some very useful updates. I’ve installed it on some machines in my lab but not all. The update is huge so I’m installing it manually rather than through WSUS. I need to test a remote machine to determine if the update  is...

January 27, 2015  1:47 PM

WMI errors

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell, WMI

Most PowerShell users will have done something like this: £> Get-WmiObject -ClassName Win32_ComputerSystem Domain              : WORKGROUP Manufacturer        : Microsoft Corporation Model               : Surface Pro 2 Name               ...


December 15, 2014  3:54 PM

WMI — identifying writable properties

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, Powershell, WMI

One common mistake I see is people trying to set the value of a read only property on a WMI class. There isn’t a quick way to see if a property is writable. Get-CimClass can be used but you have to dig into the Qualifiers for each property. You can use this function to determine the read\write...


November 4, 2014  12:27 PM

WMI integer properties – alternative decoding options

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell, WMI

WMI has many properties where the the value is an integer: £> Get-CimInstance -ClassName Win32_LogicalDisk | Format-Table DeviceId, DriveType, Size, FreeSpace -a DeviceId DriveType         Size    FreeSpace --------...


October 13, 2014  2:22 PM

WMI Associations

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, Powershell, WMI

I saw a question regarding finding the Win32_NetworkAdapter instance using the matching Win32_NetworkAdapterConfiguration starting point. This answers the “which adapter has an IP address of X” type question. The Index property on a Win32_NetworkAdapterConfiguration instance has the same...


September 22, 2014  2:26 PM

WMI and CIM dates

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, Powershell, WMI

A question on the forum asked about extracting the year from the ReleaseDate property returned by Win32_BIOS They were trying to do this: Get-CimInstance Win32_BIOS | Select-Object @{n="ReleaseDate";e={$_.ConvertToDateTime($_.ReleaseDate).year()}} There are 2 problems with this approach...


September 8, 2014  1:36 PM

CimInstanceProperties

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, WMI

If you use Get-CimInstance and examine the object returned – you’ll find some meta-data at the end of the object: CimClass                                  : root/cimv2:Win32_OperatingSystem CimInstanceProperties                     :...


September 5, 2014  3:03 PM

Finding a file version

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
WMI

Interesting question on the forum – how to find the file version of IE on remote machines? Get-CimInstance -ClassName CIM_DataFile -Filter "Name = 'C:\\Program Files\\Internet Explorer\\iexplore.exe'"  | select -ExpandProperty Version Use the CIM_dataFile class.  Its one of the few CIM_...


August 10, 2014  2:51 AM

WMI troubleshooting

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, WMI

A WMI troubleshooting series has been started on the Ask the Performance Team Blog. The overview article is: 0 Comments     RSS Feed     Email a friend


August 5, 2014  12:42 PM

ServerManagerTasks module – – Get-SMServerFeature

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, WMI

Finding the Windows features installed on a remote machine can be an interesting task. You could use Get-WindowsFeature but that gives you a “graphical” display: £> Get-WindowsFeature | where DisplayName -like '*DNS*' Display Name        ...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: