Get-WmiObject Becomes Obsolete

by Nov 14, 2012

In PowerShell 3.0, while you still can use the powerful Get-WmiObject cmdlet, it is slowly becoming replaced by the family of CIM cmdlets.

If you use Get-WmiObject to query for data, you can easily switch to Get-CimInstance. Both work very similar. The results from Get-CimInstance, however, do not contain any methods anymore.

If you must ensure backwards compatibility, on the other hand, you may want to avoid CIM cmdlets. They require PowerShell 3.0 and won't run on Windows XP and Vista/Server 2003

Twitter This Tip! ReTweet this Tip!