WMI vs CIM
An email debate yesterday regarding the use of the CIM cmdlets (new in PowerShell 3) vs the WMI cmdlets made me realise that other people are probably wondering the same thing,
The question is really part of a the semi-philosophical debate about when you should adopt new technology.
In the case of the WMI/CIM cmdlets the resolution is fairly straightforward.
If you are using PowerShell v2 you have to use the WMI cmdlets.
If you are using PowerShell v3 – even if you are accessing legacy systems I would recommend the CIM cmdlets. There are a number of benefits to using the CIM cmdlets:
- use of WSMAN for remote access – no more DCOM error. You can drop back to DCOM for accessing systems with WSMAN 2 installed
- use of CIM sessions for accessing multiple machines
- Get-CIMClass for investigating WMI classes
- improved way of dealing with WMI associations
As far as I am aware the only thing the CIM cmdlets can’t do is access amended qualifiers such as the class description. Seeing that many classes don’t that set it’s not a major hardship.
Now that I’ve recommended you should use them I’d better show you how – that will cover a mini-series of posts over the next few days