PowerShell for Windows Admins

Mar 24 2013   6:04AM GMT

WMI vs CIM



Posted by: Richard Siddaway
Tags:
PowerShell 3
WMI

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

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: