title: Powershell V2 External MAML Help
body: <p>I'm trying to create an external MAML help file for a script Module. As a test I created a simple module called "ModTest" with 2 functions saved in a .psm1 file:</p>
  
  <pre><code>function Test-SqlScript2 
  {
  }
  function Out-SqlScript2
  {
  }
  </code></pre>
  
  <p>I saved the module in my user Modules directory ~\Documents\Modules\ModTest
  Next I created a subdirectory for a MAML file ~\Documents\Modules\ModTest\en-US
  The MAML file I'm using for testing is available <a href="http://cid-ea42395138308430.skydrive.live.com/embedicon.aspx/Public/Blog/ModTest.help.xml" rel="nofollow noreferrer">here</a>. I then started PowerShell and used Import-Module to import the module.</p>
  
  <p>Unlike compiled cmdlets the placement of the file does not work by itself</p>
  
  <p>So, next I tried adding the help link to the top of the script module, which also doesn't work:</p>
  
  <pre><code>&lt;#
  .ExternalHelp C:\Users\cmiller6\Documents\WindowsPowershell\Modules\ModTest\en-US\ModTest.help.xml 
  #&gt;
  
  
  function Test-SqlScript2 
  {
  }
  function Out-SqlScript2
  {
  </code></pre>
  
  <p>Then I tried adding the help info to each function, which does work:</p>
  
  <pre><code>function Test-SqlScript2 
  {
  &lt;#
  .ExternalHelp C:\Users\cmiller6\Documents\WindowsPowershell\Modules\ModTest\en-US\ModTest.help.xml 
  #&gt;
  }
  function Out-SqlScript2
  {
  &lt;#
  .ExternalHelp C:\Users\cmiller6\Documents\WindowsPowershell\Modules\ModTest\en-US\ModTest.help.xml 
  #&gt;
  </code></pre>
  
  <p><strong>Two questions:</strong></p>
  
  <ol>
  <li>Is it possible to create a script
  module level external MAML help OR
  do you need to specify the help link
  in each function? </li>
  <li>Although the
      documentation claims and blog posts
      indicate that the language specific folder
      i.e. en-US will be automatically
      searched when specifying a path (~/ModTest\ModTest.help.xml) I
      could not get the MAML file to
      resolve unless I included the
      explicit path (~/ModTest/en-US/ModTest.help.xml). Is this a bug? See the following
      links for documentation on get-help and language specific
      folders:</li>
  </ol>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/dd878343(VS.85).aspx" rel="nofollow noreferrer">Writing Help for Windows PowerShell Modules</a>
  <a href="http://blogs.msdn.com/powershell/archive/2008/12/24/powershell-v2-external-maml-help.aspx" rel="nofollow noreferrer">PowerShell V2 External MAML Help</a> </p>