{"id":6631,"date":"2015-04-16T00:01:00","date_gmt":"2015-04-16T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2015\/04\/16\/look-at-schema-of-wmi-class-with-powershell\/"},"modified":"2019-02-18T10:29:52","modified_gmt":"2019-02-18T17:29:52","slug":"look-at-schema-of-wmi-class-with-powershell","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/look-at-schema-of-wmi-class-with-powershell\/","title":{"rendered":"Look at Schema of WMI Class with PowerShell"},"content":{"rendered":"<p><b style=\"font-size:12px\">Summary<\/b><span style=\"font-size:12px\">: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to look at the schema of a WMI class.<\/span>\nMicrosoft Scripting Guy, Ed Wilson, is here. One of the cool things about WMI is that it is largely self-describing. This means that I can use WMI and look at WMI. With the CIM cmdlets, this goes even a step further. For example, if I want to look at the <b>Win32_Desktop<\/b> WMI class, I can use the <b>Get-CimClass<\/b> cmdlet, and examine it:<\/p>\n<p style=\"margin-left:30px\">PS C:&gt; Get-CimClass win32_desktop<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp; NameSpace: ROOT\/cimv2<\/p>\n<p style=\"margin-left:30px\">CimClassName &nbsp; &nbsp; &nbsp; &nbsp; CimClassMethods&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CimClassProperties&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">&#8212;&#8212;&#8212;&#8212;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;&#8212; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">Win32_Desktop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {Caption, Description,&#8230;\nFrom this output, I can see that the class appears in the Root\/cimv2 WMI namespace. Not really a surprise because that is the default namespace. I can also see that there are no methods. This means that I will not be able to do much more than view information. I can drill down further to see the properties. To do this, I select and expand the <b>cimClassProperties<\/b> property. This is shown here:<\/p>\n<p style=\"margin-left:30px\">Get-CimClass win32_desktop | select -ExpandProperty cimclassproperties\nThe output, however, scrolls and scrolls because each property is more than a simple name. It contains qualifiers, flags, and more. Here is the output for the first couple of properties:<\/p>\n<p style=\"margin-left:30px\">PS C:&gt; Get-CimClass win32_desktop | select -ExpandProperty cimclassproperties<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Caption<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : String<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, ReadOnly, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {MaxLen, read}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Description<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : String<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, ReadOnly, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {read}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :\nOne of the things that is interesting is that the qualifiers are Read Only. Some properties are actually Read\/Write; therefore, the class may not expose a method, but it still has updatable properties. I first look for all <b>Read<\/b><i> <\/i>properties. This command and partial output are shown here:<\/p>\n<p style=\"margin-left:30px\">PS C:&gt; (Get-CimClass win32_desktop | select -ExpandProperty cimclassproperties).where({$psitem.qualifiers -match &#8216;read&#8217;})<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Caption<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : String<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, ReadOnly, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {MaxLen, read}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Description<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : String<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, ReadOnly, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {read}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :&nbsp;\nNow, I want to see if there are any writable properties exposed via this class. Here is the command I use:<\/p>\n<p style=\"margin-left:30px\">PS C:&gt; (Get-CimClass win32_desktop | select -ExpandProperty cimclassproperties).where({$psitem.qualifiers -match &#8216;write&#8217;})<\/p>\n<p style=\"margin-left:30px\">PS C:&gt;&nbsp;\nHmm&hellip;nothing comes back.\nWell, that was to be expected. I happen to know of a WMI class, <b>Win32_ComputerSystem<\/b>, that contains a few writable properties. So I test my command on that class. Here is the command and the results:<\/p>\n<p style=\"margin-left:30px\">PS C:&gt; (Get-CimClass win32_computersystem | select -ExpandProperty cimclassproperties).where({$psitem.qualifiers -match &#8216;write&#8217;})<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Roles<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : StringArray<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {read, write}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : AutomaticManagedPagefile<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Boolean<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {MappingStrings, read, write}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : AutomaticResetBootOption<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Boolean<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {MappingStrings, read, write}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : CurrentTimeZone<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : SInt16<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {MappingStrings, read, write}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : EnableDaylightSavingsTime<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Boolean<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {write}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : SystemStartupDelay<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : UInt16<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {DEPRECATED, MappingStrings, Privileges, read&#8230;}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : SystemStartupOptions<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : StringArray<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {DEPRECATED, MappingStrings, Privileges, read&#8230;}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : SystemStartupSetting<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : UInt8<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {DEPRECATED, MappingStrings, Privileges, read&#8230;}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Workgroup<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : String<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {MappingStrings, read, write}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :\nIt seems that some of the properties are deprecated. This means that I am not supposed to use them. I wonder if I can find an easier way to see this information. I modify my command. This command is pretty long, and it is a single-line command that wrapped on the blog:<\/p>\n<p style=\"margin-left:30px\">PS C:&gt; (Get-CimClass win32_computersystem | select -ExpandProperty cimclassproperties).where({$psitem.qualifiers -match &#8216;write&#8217; -and $psitem.qualifiers -match &#8216;deprecated&#8217;})<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : SystemStartupDelay<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : UInt16<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {DEPRECATED, MappingStrings, Privileges, read&#8230;}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : SystemStartupOptions<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : StringArray<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {DEPRECATED, MappingStrings, Privileges, read&#8230;}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :<\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : SystemStartupSetting<\/p>\n<p style=\"margin-left:30px\">Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"margin-left:30px\">CimType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : UInt8<\/p>\n<p style=\"margin-left:30px\">Flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Property, NullValue<\/p>\n<p style=\"margin-left:30px\">Qualifiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {DEPRECATED, MappingStrings, Privileges, read&#8230;}<\/p>\n<p style=\"margin-left:30px\">ReferenceClassName :\nIt looks like the startup stuff is all deprecated.\nIf I only want to look at the property names, I can choose it directly from my query. This is shown here:<\/p>\n<p style=\"margin-left:30px\">PS C:&gt; (Get-CimClass win32_desktop | select -ExpandProperty cimclassproperties).name<\/p>\n<p style=\"margin-left:30px\">Caption<\/p>\n<p style=\"margin-left:30px\">Description<\/p>\n<p style=\"margin-left:30px\">SettingID<\/p>\n<p style=\"margin-left:30px\">BorderWidth<\/p>\n<p style=\"margin-left:30px\">CoolSwitch<\/p>\n<p style=\"margin-left:30px\">CursorBlinkRate<\/p>\n<p style=\"margin-left:30px\">DragFullWindows<\/p>\n<p style=\"margin-left:30px\">GridGranularity<\/p>\n<p style=\"margin-left:30px\">IconSpacing<\/p>\n<p style=\"margin-left:30px\">IconTitleFaceName<\/p>\n<p style=\"margin-left:30px\">IconTitleSize<\/p>\n<p style=\"margin-left:30px\">IconTitleWrap<\/p>\n<p style=\"margin-left:30px\">Name<\/p>\n<p style=\"margin-left:30px\">Pattern<\/p>\n<p style=\"margin-left:30px\">ScreenSaverActive<\/p>\n<p style=\"margin-left:30px\">ScreenSaverExecutable<\/p>\n<p style=\"margin-left:30px\">ScreenSaverSecure<\/p>\n<p style=\"margin-left:30px\">ScreenSaverTimeout<\/p>\n<p style=\"margin-left:30px\">Wallpaper<\/p>\n<p style=\"margin-left:30px\">WallpaperStretched<\/p>\n<p style=\"margin-left:30px\">WallpaperTiled\nBecause I may not know what qualifiers a WMI class supports, I can easily use the <b>Get-CimClass<\/b> cmdlet to return those qualifiers:<\/p>\n<p style=\"margin-left:30px\">PS C:&gt; (Get-CimClass win32_process).CimClassQualifiers.name<\/p>\n<p style=\"margin-left:30px\">Locale<\/p>\n<p style=\"margin-left:30px\">UUID<\/p>\n<p style=\"margin-left:30px\">CreateBy<\/p>\n<p style=\"margin-left:30px\">DeleteBy<\/p>\n<p style=\"margin-left:30px\">dynamic<\/p>\n<p style=\"margin-left:30px\">provider<\/p>\n<p style=\"margin-left:30px\">SupportsCreate<\/p>\n<p style=\"margin-left:30px\">SupportsDelete<\/p>\n<p style=\"margin-left:30px\">PS C:&gt; (Get-CimClass win32_desktop).CimClassQualifiers.name<\/p>\n<p style=\"margin-left:30px\">Locale<\/p>\n<p style=\"margin-left:30px\">UUID<\/p>\n<p style=\"margin-left:30px\">dynamic<\/p>\n<p style=\"margin-left:30px\">Privileges<\/p>\n<p style=\"margin-left:30px\">provider<\/p>\n<p style=\"margin-left:30px\">PS C:&gt; (Get-CimClass win32_Computersystem).CimClassQualifiers.name<\/p>\n<p style=\"margin-left:30px\">Locale<\/p>\n<p style=\"margin-left:30px\">UUID<\/p>\n<p style=\"margin-left:30px\">dynamic<\/p>\n<p style=\"margin-left:30px\">provider<\/p>\n<p style=\"margin-left:30px\">SupportsUpdate\nKeep in mind that these are qualifiers on the WMI class itself, not qualifiers on the properties. I can obtain a list of all the qualifiers on all of the properties, sort them, and then get the unique qualifier names. This is shown here:<\/p>\n<p style=\"margin-left:30px\">PS C:&gt; (Get-CimClass win32_process | select -ExpandProperty cimclassproperties).qualifiers.name | sort | get-unique<\/p>\n<p style=\"margin-left:30px\">CIM_Key<\/p>\n<p style=\"margin-left:30px\">Fixed<\/p>\n<p style=\"margin-left:30px\">key<\/p>\n<p style=\"margin-left:30px\">MappingStrings<\/p>\n<p style=\"margin-left:30px\">MaxLen<\/p>\n<p style=\"margin-left:30px\">Override<\/p>\n<p style=\"margin-left:30px\">Privileges<\/p>\n<p style=\"margin-left:30px\">Propagated<\/p>\n<p style=\"margin-left:30px\">read<\/p>\n<p style=\"margin-left:30px\">ValueMap\n<span>That is all there is to using Windows PowerShell to look at a WMI class schema. CIM Week will continue tomorrow when I will talk about more cool stuff.<\/span>\nI invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"http:\/\/blogs.technet.commailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.\n<b>Ed Wilson, Microsoft Scripting Guy<\/b><span style=\"font-size:12px\">&nbsp;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to look at the schema of a WMI class. Microsoft Scripting Guy, Ed Wilson, is here. One of the cool things about WMI is that it is largely self-describing. This means that I can use WMI and look at WMI. With the CIM cmdlets, [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[385,3,4,45,6],"class_list":["post-6631","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-cim","tag-scripting-guy","tag-scripting-techniques","tag-windows-powershell","tag-wmi"],"acf":[],"blog_post_summary":"<p>Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to look at the schema of a WMI class. Microsoft Scripting Guy, Ed Wilson, is here. One of the cool things about WMI is that it is largely self-describing. This means that I can use WMI and look at WMI. With the CIM cmdlets, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/6631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=6631"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/6631\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=6631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=6631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=6631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}