September 12th, 2012

PowerTip: Easily Find WMI Class Schema Information with PowerShell

Doctor Scripto
Scripter

Summary: Use a one-line command to obtain WMI class schema (MOF) information.

Hey, Scripting Guy! Question How can I use Windows PowerShell to display the MOF of a WMI class?

Hey, Scripting Guy! Answer Use the WMIClass type accelerator, and then call the static GetText method whilst supplying the word MOF:

            ([wmiclass]”Win32_Pingstatus”).gettext(“MOF”)

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.