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