Partager via


HealthDefinition Element

 

Applies To: Windows Server 2012 Essentials, Windows Home Server 2011, Windows Storage Server 2008 R2 Essentials, Windows Small Business Server 2011 Essentials

Specifies alerts, health states, and repairs for the health add-in.

  
<xs:element name="HealthDefinition" type="HealthDefinitionElement" maxOccurs="unbounded" minOccurs="0" />  
  
<xs:complexType name="HealthDefinitionElement">  
  <xs:sequence>  
    <xs:element name="Filter" maxOccurs="1" minOccurs="0">...</xs:element>  
    <xs:element name="Condition" maxOccurs="1" minOccurs="0">...</xs:element>  
    <xs:element name="HealthStatusChange">...</xs:element>  
    <xs:element name="AlertAction" maxOccurs="1" minOccurs="0">...</xs:element>  
    <xs:element name="Troubleshoot" type="TroubleshootElement" minOccurs="0"/>  
    <xs:element name="RepairAction" maxOccurs="1" minOccurs="0">...</xs:element>  
  </xs:sequence>  
  <xs:attribute name="Name" type="xs:ID" use="required" />  
  <xs:attribute name="Title" type="xs:string" use="required" />  
</xs:complexType>  

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
Name Required ID attribute.

Specifies the name of the health definition. The name must be unique among all of the health definitions of the feature.
Title Required string attribute

Specifies the title of the health definition.

Child Elements

Element Description
Filter Element (HealthDefinition) Specifies whether the health definition is applicable to the current version of the operating system.
Condition Element Specifies a PowerShell script (using the PowerShell element) or a managed assembly (using the Binary element) that checks the condition of a component. The managed assembly must implement the IBinaryAction interface.
HealthStatusChange Element Specifies the health state of the system. The health state can be one of the following values: OK, Information, Warning, or Critical.
AlertAction Element Specifies the notification action that is performed when the specified condition occurs. The action can be a PowerShell script or a managed assembly.
Troubleshoot Element Specifies information that can be used to attempt to manually resolve the problem.
RepairAction Element Specifies the action that is performed to fix a problem.

Parent Elements

Element Description
HealthDefinitions Element Represents the notifications and actions that are used to report and repair issues with operating system features.

See Also

How to: Create a Definition XML File