WMIC, WmiObject, CimInstance Formatting

wmic bios get serialnumber

Reference: http://support.microsoft.com/kb/558124

New formats:

Get-WmiObject -Class "Win32_SystemEnclosure" | Select-Object SerialNumber
# OR
Get-CimInstance -Class "Win32_SystemEnclosure" | Select-Object SerialNumber

Another type of Query:

Get-WmiObject -Query "SELECT * FROM Win32_ComputerSystem" -ComputerName .
# OR
Get-CimInstance -Query "SELECT * FROM Win32_ComputerSystem" -ComputerName .
Advertisements