header image

W2KSG: Service Pack

Posted by: | September 30, 2008 | No Comment |

Continuing our look at Operating Systems – what about Service Pack information

Listing 8.8

Get-WmiObject -Class Win32_OperatingSystem | Format-List ServicePackMajorVersion, ServicePackMinorVersion

In this one I’m using Format-List to perform the selection as well as the display.  We could make it simpler if we used the -property parameter on get-wmiobject but that also displays the WMI info such as class, genus etc, etc

 

Share this post :

 

Technorati Tags: PowerShell,WMI

under: PowerShell and WMI