title: How do i allow powershell to accept an empty string for a named parameter?
body: <p>I'm making a call to a powershell script:</p>
  
  <pre><code>powershell.exe -file basic.ps1 -User ""
  </code></pre>
  
  <p>I have other parameters, this is a bit watered down.</p>
  
  <p>The PS script accepts the params :</p>
  
  <pre><code>[CmdLetBinding()]
  param(
   [Parameter(Mandatory=$true)]
  [AllowEmptyString()]
  [string]$User = 't'
  )
  </code></pre>
  
  <p>When I run command i get:</p>
  
  <blockquote>
    <p>Missing an argument for parameter 'User'. Specify a parameter of type 'System.String' and try again.</p>
  </blockquote>
  
  <p>I was under the assumption that <code>AllowEmptyString</code> would allow this?</p>