Windows PowerShell includes the ability to query WMI on the local and remote machines using the Get-CimInstance cmdlet.


Local Machine

Simply enter the command replacing the query as required.

Get-CimInstance -Namespace "root\cimv2" -ClassName Win32_OperatingSystem




Remote Machine

Simply enter the required query and provide the ComputerName parameter.

Get-CimInstance -Namespace "root\cimv2" -ClassName Win32_OperatingSystem -ComputerName computer name



Troubleshooting

It is possible to see any errors within the PowerShell output.