Provider Cmdlet Help

When writing a provider, you can implement your own Help for the provider cmdlets that you support. This includes a single Help topic for each provider cmdlet or multiple versions of a Help topic for cases where the provider cmdlet acts differently based on the use of dynamic parameters. This cmdlet Help is sometimes referred to as custom cmdlet Help.

Displaying the Help

The Windows PowerShell engine calls the GetHelpMaml method to display the Help topic for your provider cmdlets. The engine provides the name of the cmdlet that the user specified when running the Get-Help cmdlet and the current path of the user. The current path is required if your provider implements different versions of the same provider cmdlet for different drives. The method must return a string that contains the XML for the cmdlet Help.

Help Content

The content for the Help file is written using PSMAML XML. This is the same XML schema that is used for writing Help content for stand-alone cmdlets. Add the content for your custom cmdlet Help to the Help file for your provider under the CmdletHelpPaths element. The example below shows the command element for a single provider cmdlet, and it shows how you specify the name of the provider cmdlet that your provider supports:

<CmdletHelpPaths>
  <command:command>
    <command:details>
      <command:name>ProviderCmdletName</command:name>
      <command:verb>Verb</command:verb>
      <command:noun>Noun</command:noun>
    <command:details>
  </command:command> 
<CmdletHelpPath>

See Also

Other Resources

Writing a Windows PowerShell Provider