Tuesday, March 31, 2015

Get WMI class by PowerShell

It's easy for us to get WMI classes by performing PowerShell cmdlet. We can perform Get-WmiObject -List or Get-CimClass to get WMI classes.

Remark: To use Get-CimClass cmdlet, we need to install Windows Management Framework (WMF) 3.0 or later.

By default, Get-WmiObject -List and Get-CimClass show all WMI classes which are under Root\Cimv2. To get other WMI classes, we need to add -Namespace into Get-WmiObject and Get-CimClass cmdlets. Using Get-CimClass, we can use tab key to find the namespace.

Or insert "Ctrl" + "Space" into Windows PowerShell ISE to show all Namespace.

This posting is provided “AS IS” with no warranties, and confers no rights!

No comments:

Post a Comment