You can use PowerShell to quickly display your server’s OS and SP levels. The following example shows how you how you can use the Get-WmiObject cmdlet to retrieve you server’s name, operating system, x86 architecture type and major service pack level.
# Get Operating System Info
$sServer = "myserver"
$sOS =Get-WmiObject -class Win32_OperatingSystem -computername $sServer
foreach($sProperty in $sOS)
{
write-host $sProperty.Description
write-host $sProperty.Caption
write-host $sProperty.OSArchitecture
write-host $sProperty.ServicePackMajorVersion
}
2 comments
Hide comments