This section describes how to create a valid XML file for a Microsoft® Windows® PowerShell cmdlet Help topic. This section discusses how to name the Help file, how to add the appropriate XML headers, and how to add nodes that will contain the different sections of the cmdlet Help content.
Note: |
|---|
| For a complete view of a Help file, open one of the dll-Help.xml files located in the Microsoft® Windows® PowerShell installation directory. For example, the Microsoft.PowerShell.Commands.Management.dll-Help.xml file contains content for several of the Windows PowerShell cmdlets. |
Topics in this section include:
Name the Help File
Create a text file and save it. The file name must have the following format so that Microsoft® Windows® PowerShell can detect it as a cmdlet Help file.
<PSSnapInAssemblyName>.dll-Help.xml
Add an XML Header
Add the following XML headers to the text file. Be aware that the file will be validated against the Multi-Agent Modeling Language (MAML) schema. Currently, Microsoft® Windows® PowerShell does not provide any tools to validate the file.
<?xml version="1.0" encoding="utf-8" ?>
<helpItems xmlns="http://msh" schema="maml">
Add a Command Node
Add a <command:command> node to the cmdlet Help file for each cmdlet in the assembly. Each node within the <command:command> node relates to different sections of the cmdlet Help topic. The following table lists brief descriptions of each node, followed by the XML used to define these nodes.
xmlns:maml=http://schemas.microsoft.com/maml/2004/10
xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004
/10"
xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
<comand:details>
<!--Add name an synopsis here-->
</comand:details>
<maml:description>
<!--Add detailed description here-->
</maml:description>
<command:syntax>
<!--Add syntax information here-->
</command:syntax>
<command:parameters>
<!--Add parameter information here-->
</command:parameters>
<command:inputTypes>
<!--Add input type information here-->
</command:inputType>
<command:returnValues>
<!--Add return value information here-->
</command:inputValues>
<maml:alertSet>
<!--Add Note information here-->
</maml:alertSet>
<command:examples>
<!--Add cmdlet examples here-->
</command:inputValues>
<maml:relatedLinks>
<!--Add links to related content here-->
</maml:relatedLinks>
</command:command>
See Also