title: Powershell "special" switch parameter
body: <p>I have the powershell function below </p>
  
  
  
  <pre class="lang-powershell prettyprint-override"><code>Function Test
  {
      Param
      (               
          [Parameter()]
          [string]$Text = "default text"
      )
  
      Write-Host "Text : $($Text)"
  }
  </code></pre>
  
  <p>And I would like to be able to call this function like below :</p>
  
  <p><strong>Test -Text</strong> : should display the default text on the host</p>
  
  <p><strong>Test -Text "another text"</strong> : should display the provided text on the host</p>
  
  <p>My issue is that the first syntax is not allowed in powershell .. </p>
  
  <p>Any ideas of how I can achieve this goal ? 
  I would like a kind of 'switch' parameter that can take values other than boolean.</p>
  
  <p>Thanks</p>