title: PowerShell Advanced Function get current ParameterSetName
body: <p>In C# you can get the current <code>ParameterSetName</code> in the <code>ProcessRecord</code> override of a PowerShell <code>Cmdlet</code> with code like this:</p>
  
  <pre><code> switch (ParameterSetName)
   {
        case FromUriParamSetName:
             loadFromUri();
             break;
  
        case FromFileParamSetName:
             loadFromFile();
             break;
   }
  </code></pre>
  
  <p>I'm trying to figure out how I can get the value for <code>ParameterSetName</code> in a script cmdlet (Advanced Function).</p>