Learn about Windows PowerShell
Summary: Use a one-line command to obtain WMI class schema (MOF) information.
How can I use Windows PowerShell to display the MOF of a WMI class?
Use the WMIClass type accelerator, and then call the static GetText method whilst supplying the word MOF:
([wmiclass]"Win32_Pingstatus").gettext("MOF")
@ed - good tip for investigating class structures
Don't forget that we can turn the MOF into an Object so it is easier to create reports or other objects.
#WMI format
[xml]$wmidtd=(([wmiclass]"Win32_Pingstatus").gettext('WMIDtd20'))
$wmidtd.Class
#Cim fromat
[xml]$Cimdtd=(([wmiclass]"Win32_Pingstatus").gettext('CimDtd20'))
$cimdtd.Class
@JRV this is a really cool tip and it makes it easy to work with as well. Very nice!
@Ed - I thought you might like it. It dovetails with your other XML articles.
@JRV indeed it does, like I said, "way cool"