O'Reilly logo

Mastering Windows PowerShell Scripting by Brenton J.W. Blawat

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

Creating, modifying, and removing WMI property instances

PowerShell provides the ability to create, modify, and remove new properties in WMI classes. If you want to modify an instance of a property, you have to determine if the property has writeable attributes using the get-cimclass cmdlet. To do this, you select a WMI class by calling the get-cimclass cmdlet and referencing the class you want to evaluate. You then gather the expanded properties of the class by piping the get-cimclass output to the selection criteria of Select –ExpandedProperty CimClassProperties.

After gathering the expanded properties, the results need to be piped to the selection criteria of where {$_.Qualifiers –match "write"}. On entering this command, you will see all the ...

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