Test WMI Query Connection PowerShell
In this post, I describe a quick way to test a WMI connection with a query run using PowerShell. This can be done from both local and remote machines.
Local Machine
Open PowerShell and run the following example command:
Get-WmiObject -query "SELECT * FROM Win32_OperatingSystem"
You can replace the query parameter value with other WMI queries.
Remote Machine
To test a WMI connection to a remote machine, open PowerShell and run the following example command, replacing the ComputerName parameter value with the appropriate machine name:
Get-WmiObject -query "SELECT * FROM Win32_OperatingSystem -ComputerName MachineName
wbemtest
You can also test WMI by running wbemtest (Start > Run > wbemtest).
Press the Connect button, then the Connect button again, then the Query button:
SELECT * FROM Win32_OperatingSystem
into the Enter Query textbox, then press the Apply button to see the Query Result:This can also be used to test WMI on remote machines by including the machine name in the namespace e.g.
\\DC-2K12R2-DEMO\root\cimv2
Video
YouTube link: Test WMI Query PowerShell
Related Posts
- WARNING: Unable to resolve package source 'https //www.powershellgallery.com/api/v2'
Thank you, very helpful !
ReplyDeleteGlad my post helped. Thanks for your comment!
Delete