Export (0) Print
Expand All
Expand Minimize

policyDefinitions Element

Applies To: Windows Server 2008

The policyDefinitions element is the document element for an .admx file that defines a set of registry-policy settings. The policyDefinitions element also declares a default namespace for all of the elements in the .admx file.

<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="<MajorVerison.MinorVersion>" schemaVersion="<MajorVerison.MinorVersion>" xmlns=" http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions" >
  <policyNamespaces> … </policyNamespaces>
  <supersededAdm> … </supersededAdm>
  <resources> … </resources>
  <supportedOn> … </supportedOn>
  <categories> … </categories>
  <policies> … </policies>
</policyDefinitions>

 

Attributes Required Description

xmlns Attribute

No

xmlns:xsd ="http://www.w3.org/2001/XMLSchema"

Designation for elements and data types used in the schema that comes from the "http://www.w3.org/2001/XMLSchema" namespace. This attribute is typed as shown.

xmlns Attribute

No

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

Designation for the XML Schema Instance namespace available is from the "http://www.w3.org/2001/XMLSchema-instance" namespace. This attribute is typed as shown.

revision Attribute

Yes

revision="<MajorVerison.MinorVersion>"

Version of the .admx file for tracking purposes.

schemaVersion Attribute

Yes

schemaVersion="<MajorVerison.MinorVersion>"

Schema version used by the Group Policy tools. For Windows Vista and Windows Server 2008 schemaVersion must be set as follows; schemaVersion="1.0"

xmlns Attribute

No

The Group Policy schema namespace.

noteNote
The Group Policy tools will successfully consume the .admx file that does not include the xmlns:xsd, xmlns:xsi, and xmlns attributes. The .admx file may not validate as a fully-formed XML file if the xmlns:xsd, xmlns:xsi, and xmlns attributes are not included in the .admx file.

 

Element Required Description

policyNamespaces Element

Yes

Contains mappings of .admx files to unique namespaces.

supersededAdm Element

No

Reference to the file name for an .adm file. The Group Policy Management Console (GPMC) or the Local Group Policy Editor will not read any .adm file designated as superseded.

resources Element (.admx)

Yes

Contains the required minimum revision of the .adml file.

supportedOn Element

No

Mapping of products and definitions.

categories Element

No

Contains a list of categories under which Group Policy settings will be displayed in the Local Group Policy Editor and the GPMC.

policies Element

No

Contains a list of policy setting definitions.

noteNote
For simplicity of documentation, nested elements located one level down, known as child elements, will only be described for a given element.

Because the policyDefinitions element is the document element, it contains all the other elements in the document representing the .admx file. The XML declaration is not part of the document element.

This XML fragment is an example of a single policy setting to configure a registry-based value with numeric values for the enabled and disabled policy states. If the policy setting state is changed from a defined state to the not configured policy state, the existing registry value will be deleted when Group Policy is processed.

<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="0.9" schemaVersion="1.0" xmlns="http://www.microsoft.com/GroupPolicy/PolicyDefinitions">
  <policyNamespaces>
    <target prefix="example1_singlepolicysetting" namespace="Microsoft.Policies.Example1_singlepolicysetting" />
  </policyNamespaces>
  <supersededAdm fileName="example1_singlepolicysetting.adm" />
  <resources minRequiredRevision="0.9" />
  <supportedOn>
    <definitions>
      <definition name="SUPPORTED_ProductOnly" 
               displayName="$(string.SUPPORTED_ProductOnly)"/>
    </definitions>
  </supportedOn>
  <categories>
    <category name="SAMPLE" displayName="$(string.SAMPLE)"
                        explainText="$(string.SAMPLEHELP)" />
  </categories>
  <policies>
    <policy name="Sample_NoParamPolicy" class="Both" displayName="$(string.Sample_NoParamPolicy)" explainText="$(string.Sample_NoParamPolicy_Help)" key="Software\Policies\Examples" valueName="Example1NoParam">
      <parentCategory ref="SAMPLE" />
      <supportedOn ref="SUPPORTED_ProductOnly" />
      <enabledValue>
        <decimal value="1" />
      </enabledValue>
      <disabledValue>
        <decimal value="0" />
      </disabledValue>
    </policy>
  </policies>
</policyDefinitions>

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft