You can use Get-WMIObject PowerShell cmdlet to call any WMI Class. This PowerShell cmdlet not only allows you to call a WMI Class but you can also query available WMI namespaces on a local or remote computer.
For example, to call WIN32_Service WMI class, use the below command from an elevated PowerShell window:
- Get-WMIObject Win32_Service
To call WMI Class on a remote computer, use below command:
- Get-WMIObject Win32_Service –Computer ComputerName
To list all the namespaces, use the –namespace switch as listed in below command:
- Get-WMIObject –namespace “Root/CIMV2” –list
About Nirmal Sharma
Nirmal is a MCSEx3, MCITP and was awarded Microsoft MVP award in Directory Services. He is specialized in Directory Services, Microsoft Clustering, Hyper-V, SQL and Exchange and has been involved in Microsoft Technologies since 1994. In his spare time, he likes to help others and share some of his knowledge by writing tips and articles. Nirmal can be reached at firstname.lastname@example.org.