When creating your own cmdlet, you can also create Help content that Windows PowerShell can display using the Get-Help cmdlet. The Help content that describes your cmdlet can include a description of the cmdlet, the syntax used by your cmdlet, parameter descriptions, examples, and other related notes.
Caution:
The following XML shows the major sections that are in the cmdlet Help file and some of the possible values for the XML elements. This example is not exhaustive, so it is highly recommended that you look at the XML files installed with Windows PowerShell to see examples of the XML for the cmdlets provided by Windows PowerShell. For an example of of these files, see Microsoft.PowerShell.Commands.Management.dll-Help.
Creating the Help XML file
The name of the Help file must be in the following format:
MySnapinAssemblyName.dll-Help.xml
<?xml version="1.0" encoding="utf-8" ?>
<helpItems xmlns="http://msh" schema="maml">
<command:command 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">
</command:command>
<command:details>
<command:name>Verb-Noun</command:name>
<maml:description>
<maml:para>Cmdlet description.</maml:para>
</maml:description>
<maml:copyright>
<maml:para></maml:para>
</maml:copyright>
<command:verb>Cmdlet verb name</command:verb>
<command:noun>Cmdlet Noun name</command:noun>
<dev:version></dev:version>
</command:details>
<maml:para>Detailed description of cmdlet.</maml:para>
<command:syntax>
<command:syntaxItem>
<maml:name>Verb-Noun name of cmdlet</maml:name>
<command:parameter required="true" position="1">
<maml:name>Parameter1 name</maml:name>
<maml:para>Descrition of parameter1.</maml:para>
<command:parameterValue>value type</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Parameter2 name</maml:name>
<maml:para>Descrition of parameter2.</maml:para>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<maml:name>Parameter name</maml:name>
<maml:para>Parameter description.</maml:para>
<command:parameterValue required="true">
Paremeter value type.
</command:parameterValue>
<dev:type>
<maml:name></maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameters>
<command:inputTypes>
<command:inputType>
<maml:name>Type name.</maml:name>
<maml:para>Description of type.</maml:para>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<maml:name>Output object type.</maml:name>
<maml:uri />
<maml:para>
Object type description
</maml:para>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors />
<command:nonTerminatingErrors />
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para>Add content for Remark1.</maml:para>
</maml:alert>
<maml:para>Add content for Remark2.</maml:para>
</maml:alertSet>
<command:examples>
<command:example>
<maml:title>
------------------------ EXAMPLE 1 ------------------------
</maml:title>
<maml:introduction>
<maml:para>Description of example.</maml:para>
</maml:introduction>
<dev:code>Example code.</dev:code>
<dev:remarks>
<maml:para>Remarks about the example.</maml:para>
</dev:remarks>
</command:example>
</command:examples>
<maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>TopicTitle</maml:linkText>
</maml:navigationLink>
</maml:relatedLinks>
Example
<command:name>Verb-Noun cmdlet name</command:name>
<maml:para> Short description of what cmdlet does.</maml:para>
<maml:para>Description of parameter1.</maml:para>
</command:command
Steve NelsonWindows PowerShell SDK Programmer WriterVisit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx