title: PowerShell - automate comment header
body: <p>When writing up a PowerShell script, what options are there to support template insertion that infers your parameters?</p>
  <p>e.g. for the below, it'd somehow read you have <code>$Name</code> as a parameter, and then automatically produce something like below?</p>
  <pre><code>        .SYNOPSIS
  
  
          .DESCRIPTION
  
  
          .PARAMETER Name
  
  
          .PARAMETER Extension
  
  </code></pre>
  <pre><code>function Add-Extension
  {
      param ([string]$Name,[string]$Extension = &quot;txt&quot;)
      $name = $name + &quot;.&quot; + $extension
      $name
  
      &lt;#
          .SYNOPSIS
          Adds a file name extension to a supplied name.
  
          .DESCRIPTION
          Adds a file name extension to a supplied name.
          Takes any strings for the file name or extension.
  
          .PARAMETER Name
          Specifies the file name.
  
          .PARAMETER Extension
          Specifies the extension. &quot;Txt&quot; is the default.
  
          .INPUTS
          None. You cannot pipe objects to Add-Extension.
  
          .OUTPUTS
          System.String. Add-Extension returns a string with the extension or file name.
  
          .EXAMPLE
          C:\PS&gt; extension -name &quot;File&quot;
          File.txt
  
          .EXAMPLE
          C:\PS&gt; extension -name &quot;File&quot; -extension &quot;doc&quot;
          File.doc
  
          .EXAMPLE
          C:\PS&gt; extension &quot;File&quot; &quot;doc&quot;
          File.doc
  
          .LINK
          Online version: http://www.fabrikam.com/extension.html
  
          .LINK
          Set-Item
      #&gt;
  }
  </code></pre>