title: Is there a way in powershell to catch ALL named parameters
body: <p>Consider this:</p>
  
  <pre><code>Function Foo 
  {
      param(
          #????
      )
  }
  </code></pre>
  
  <p>I want to call Foo like this:</p>
  
  <pre><code>Foo -Bar "test"
  </code></pre>
  
  <p>Without it blowing up that I don't have a $bar param specified. Is that possible? :)</p>
  
  <p>Update:</p>
  
  <p>I want this to work:</p>
  
  <pre><code>Function IfFunctionExistsExecute
  {
      param ([parameter(Mandatory=$true)][string]$func, [parameter(Mandatory=$false)][string]$args)
      begin 
      {
          # ...
      }
      process
      {
          if(Get-Command $func -ea SilentlyContinue)
          {
              &amp; $func $args   # the amperersand invokes the function instead of just printing the variable
          }
          else
          {
              # ignore
          }       
      }
      end
      {
          # ...
      }
  }
  
  
  Function Foo
  {
      param([string]$anotherParam)
      process 
      {
          $anotherParam
      }
  }
  
  IfFunctionExistsExecute Foo -Test "bar"
  </code></pre>
  
  <p>This gives me:</p>
  
  <pre><code>IfFunctionExistsExecute : A parameter cannot be found that matches parameter name 'Test'.
  At C:\PSTests\Test.ps1:35 char:34
  + IfFunctionExistsExecute Foo -Test &lt;&lt;&lt;&lt;  "bar"
      + CategoryInfo          : InvalidArgument: (:) [IfFunctionExistsExecute], ParameterBindingException
      + FullyQualifiedErrorId : NamedParameterNotFound,IfFunctionExistsExecute
  </code></pre>