Do you know the difference between WMI and CIM?
CIM is the Common Information Model – http://www.dmtf.org/standards/cim
“CIM provides a common definition of management information for systems, networks, applications and services, and allows for vendor extensions. CIM’s common definitions enable vendors to exchange semantically rich management information between systems throughout the network.”
WMI is Microsoft’s implementation of CIM
Get-WmiObject CIM_DiskDrive
Get-WmiObject Win32_DiskDrive
return the same information
Win32_DiskDrive is derived from CIM_DiskDrive. The CIM class is the superclass for the Win32 class.
Why is this important?
Because in PowerShell v3 Microsoft introduce a while new API for working with WMI - and whole new bunch of cmdlets
Get-CimAssociatedInstance
Get-CimClass
Get-CimInstance
Get-CimSession
Invoke-CimMethod
New-CimInstance
New-CimSession
New-CimSessionOption
Register-CimIndicationEvent
Remove-CimInstance
Remove-CimSession
Set-CimInstance
compare these to the WMI cmdlets
Get-WmiObject
Invoke-WmiMethod
Register-WmiEvent
Remove-WmiObject
Set-WmiInstance
The analogous CIM cmdlets are highlighted.
The CIM cmdlets use different .NET classes to WMI cmdlets
PS> Get-WmiObject Win32_DiskDrive | gm
TypeName: System.Management.ManagementObject#root\cimv2\Win32_DiskDrive
PS> Get-CimInstance Win32_DiskDrive | gm
TypeName: Microsoft.Management.Infrastructure.CimInstance#root/cimv2/Win32_DiskDrive
Microsoft have made a big investment in WMI/CIM for Windows 8. I’ll explore some of the new things in coming posts