O'Reilly logo

Pro Windows PowerShell by Hristo Deshev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

20.4. Language Support for WMI Objects

Before the second release candidate build's release, the only WMI support in PowerShell was provided by the Get-WmiObject cmdlet. Luckily, user feedback made the PowerShell team reconsider that. At the last possible moment, they added several language enhancements that simplify working with WMI objects. The most important enhancements are the ability to cast specially formatted strings into WMI objects. This allows us to use strings as WMI object monikers similar to URLs. The thing to keep in mind is that all casts that have been added are just convenience features. Everything they do can be replicated using Get-WmiObject and some knowledge about how WMI and CIM work.

The first convenience feature we are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required