WMI and CIM
suggest changeRemarks
CIM vs WMI
As of PowerShell 3.0, there are two ways to work with management classes in PowerShell, WMI and CIM. PowerShell 1.0 and 2.0 only supported the WMI-module which is now superseeded by the new and improved CIM-module. In a later release of PowerShell, the WMI-cmdlets will be removed.
Comparison of CIM and WMI-modules:
CIM-cmdlet|WMI-cmdlet|What it does –––––|–––––|———— Get-CimInstance | Get-WmiObject | Gets CIM/WMI-objects for a class Invoke-CimMethod | Invoke-WmiMethod | Invokes a CIM/WMI-class method Register-CimIndicationEvent | Register-WmiEvent | Registers event for a CIM/WMI-class Remove-CimInstance | Remove-WmiObject | Remove CIM/WMI-object Set-CimInstance | Set-WmiInstance | Updates/Saves CIM/WMI-object Get-CimAssociatedInstance | N/A | Get associated instances (linked object/classes) Get-CimClass | Get-WmiObject -List | List CIM/WMI-classes New-CimInstance | N/A | Create new CIM-object Get-CimSession | N/A | Lists CIM-sessions New-CimSession | N/A | Create new CIM-session New-CimSessionOption | N/A | Creates object with session options; protocol, encoding, disable encryption etc. (for use with New-CimSession
) Remove-CimSession | N/A | Removes/Stops CIM-session
Additional resources
Should I use CIM or WMI with Windows PowerShell? @ Hey, Scripting Guy! Blog