CIM Classes and WMI Classes

CIM Classes are the parent classes upon which WMI classes built. To Manage the Windows infrastructure both CIM and WMI classes necessary. CIM Classes got introduced in PowerShell 3.0, which leverages WS-Man protocol instead of native DCOM protocol used by WMI.

Listing out available CIM Class and WMI Classes in the NameSpace

Get-CimClass -Namespace rootCIMv2

Get-WmiObject -Namespace rootCIMv2 -List

Measuring available WMI and CIM Classes in the NameSpace

(Get-CimClass -Namespace rootCIMv2 | measure).Count
(Get-WmiObject -Namespace rootCIMv2 -List | measure ).Count

Searching for class name like process

Get-CimClass -Namespace rootCIMv2 | Sort CimClassName | Where CimClassName -like '*process*'
Get-WmiObject -Namespace rootCIMv2 -List | Sort Name | Where Name -like '*process*'