{"id":104091,"date":"2020-08-18T07:00:00","date_gmt":"2020-08-18T14:00:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/oldnewthing\/?p=104091"},"modified":"2020-09-09T06:12:58","modified_gmt":"2020-09-09T13:12:58","slug":"20200818-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20200818-00\/?p=104091","title":{"rendered":"What are the possible Status values for Win32_ComputerSystem?"},"content":{"rendered":"<p>The <a title=\"Archived documentation: Win32_ComputerSystem class\" href=\"http:\/\/web.archive.org\/web\/20190711222946\/https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/cimwin32prov\/win32-computersystem\"> documentation for the Win32_<wbr \/>Computer\u00adSystem class<\/a> contains the following documentation for the Status property:<\/p>\n<blockquote class=\"q\">\n<p><b>Status<\/b><\/p>\n<p>Data type: <b>string<\/b><\/p>\n<p>Access type: Read-only<\/p>\n<p>Qualifiers: <a title=\"Standard qualifiers\" href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/WmiSdk\/standard-qualifiers\"> MaxLen<\/a> (10), <a title=\"Standard qualifiers\" href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/WmiSdk\/standard-qualifiers\"> DisplayName<\/a> (&#8220;Status&#8221;)<\/p>\n<p>Current status of an object. Various operational and nonoperational statuses can be defined. Operational statuses include: OK, Degraded, and Pred Fail, which is an element such as a SMART-enabled hard disk drive that may be functioning properly, but predicts a failure in the near future. Nonoperational statuses include: Error, Starting, Stopping, and Service, which can apply during mirror-resilvering of a disk, reloading a user permissions list, or other administrative work. Not all status work is online, but the managed element is not OK or in one of the other states.<\/p>\n<p>This property is inherited from <a title=\"CIM_ManagedSystemElement class\" href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/cimwin32prov\/cim-managedsystemelement\"> <b>CIM_<wbr \/>Managed\u00adSystem\u00adElement<\/b><\/a>.<\/p>\n<p>Values include the following:<\/p>\n<p><b>OK<\/b> (&#8220;OK&#8221;)<\/p>\n<p><b>Error<\/b> (&#8220;Error&#8221;)<\/p>\n<p><b>Degraded<\/b> (&#8220;Degraded&#8221;)<\/p>\n<p><b>Unknown<\/b> (&#8220;Unknown&#8221;)<\/p>\n<p><b>Pred Fail<\/b> (&#8220;Pred Fail&#8221;)<\/p>\n<p><b>Starting<\/b> (&#8220;Starting&#8221;)<\/p>\n<p><b>Stopping<\/b> (&#8220;Stopping&#8221;)<\/p>\n<p><b>Service<\/b> (&#8220;Service&#8221;)<\/p>\n<p><b>Stressed<\/b> (&#8220;Stressed&#8221;)<\/p>\n<p><b>NonRecover<\/b> (&#8220;NonRecover&#8221;)<\/p>\n<p><b>No Contact<\/b> (&#8220;No Contact&#8221;)<\/p>\n<p><b>Lost Comm<\/b> (&#8220;Lost Comm&#8221;)<\/p>\n<\/blockquote>\n<p>What is all this gibberish trying to say? And what does it tell us about the possible Status values for a Win32_<wbr \/>Computer\u00adSystem?<\/p>\n<p>Okay, first the answer, and then the discussion.<\/p>\n<p>The answer is that the Status for a Win32_<wbr \/>Computer\u00adSystem is always &#8220;OK&#8221;. The computer system itself does not report any interesting status for itself, though it does report status for other things, like Front\u00adPanel\u00adReset\u00adStatus<\/p>\n<p>So why does the Win32_<wbr \/>Computer\u00adSystem even have a Status property if it reports nothing interesting?<\/p>\n<p>The clue for that is in the comment that snuck in between the description and the list of status values:<\/p>\n<blockquote class=\"q\">\n<p>This property is inherited from <a title=\"CIM_ManagedSystemElement class\" href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/cimwin32prov\/cim-managedsystemelement\"> <b>CIM_<wbr \/>Managed\u00adSystem\u00adElement<\/b><\/a>.<\/p>\n<\/blockquote>\n<p>The Win32_<wbr \/>Computer\u00adSystem has a Status property not because it wants to report its own status, but because it is forced to report its own status due to inheritance.<\/p>\n<p>This also explains the rambling description: That description was also inherited from CIM_<wbr \/>Managed\u00adSystem\u00adElement. The CIM_<wbr \/>Managed\u00adSystem\u00adElement class needs to describe all of the possible managed system elements, so it has a large variety of status values available, and the documentation tries to explain what those status values mean as they could be applied to arbitrary derived classes.<\/p>\n<p>Some reformatting and additional clarifying words might help:<\/p>\n<blockquote class=\"q\">\n<p>Current status of an object.<\/p>\n<p>Various operational and nonoperational statuses can be defined.<\/p>\n<p>Operational statuses include: OK, Degraded, and Pred Fail. (Pred Fail is reported by an element such as a SMART-enabled hard disk drive that may be functioning properly, but predicts a failure in the near future.)<\/p>\n<p>Nonoperational statuses include: Error, Starting, Stopping, and Service. (Service can be reported during mirror-resilvering of a disk, reloading a user permissions list, or other administrative work. Such work may force the element to go offline temporarily.)<\/p>\n<p>This property is inherited from <a title=\"CIM_ManagedSystemElement class\" href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/cimwin32prov\/cim-managedsystemelement\"> <b>CIM_<wbr \/>Managed\u00adSystem\u00adElement<\/b><\/a>. Not all status values described here may apply to a derived class.<\/p>\n<\/blockquote>\n<p>But really, the description for that property should be marked as non-inherited (even though the property is inherited), and a custom description used instead:<\/p>\n<blockquote class=\"q\">\n<p>Current status of an object.<\/p>\n<p>For <b>Win32_<wbr \/>Computer\u00adSystem<\/b> the Status is always &#8220;OK&#8221;.<\/p>\n<p>This property is inherited from <a title=\"CIM_ManagedSystemElement class\" href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/cimwin32prov\/cim-managedsystemelement\"> <b>CIM_<wbr \/>Managed\u00adSystem\u00adElement<\/b><\/a>.<\/p>\n<\/blockquote>\n<p>And that&#8217;s <a title=\"Win32_ComputerSystem class\" href=\"https:\/\/docs.microsoft.com\/windows\/win32\/cimwin32prov\/win32-computersystem\"> what the documentation says<\/a> <a title=\"Pull request: Clarify Win32_ComputerSystem Status\" href=\"https:\/\/github.com\/MicrosoftDocs\/win32\/pull\/477\"> as of last week<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There&#8217;s really only one possible status.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[104],"class_list":["post-104091","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-tipssupport"],"acf":[],"blog_post_summary":"<p>There&#8217;s really only one possible status.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/104091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=104091"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/104091\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=104091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=104091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=104091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}