title: What is the difference between PSCredentialUIOptions.Default and PSCredentialUIOptions.ValidateUserNameSyntax?
body: <p>One of the overloads in PowerShell for the <code>$Host.UI.PromptForCredential</code> method has an <code>options</code> parameter, which is a bitwise combination of <code>PSCredentialUIOptions</code> values.</p>
  
  <p>Looking at <a href="https://msdn.microsoft.com/en-us/library/system.management.automation.pscredentialuioptions%28v=vs.85%29.aspx" rel="nofollow">MSDN for PSCredentialUIOptions</a> I find the enum values include:</p>
  
  <blockquote>
    <p><strong>Default</strong> : Validates the user name, but not its existence or
    correctness.</p>
  </blockquote>
  
  <p>and </p>
  
  <blockquote>
    <p><strong>ValidateUserNameSyntax</strong> : Validates the syntax of the user name, but
    not its existence or correctness.</p>
  </blockquote>
  
  <p>What exactly do these descriptions mean?  </p>
  
  <p>For Default, when it validates the user name, does it mean it just checks the user has entered something, anything, in the User Name field of the PSCredentials dialog?  </p>
  
  <p>And for <code>ValidateUserNameSyntax</code>, how does it validate the syntax of the user name?  By checking for illegal characters in the entered text?</p>
  
  <p>I've tried Googling for more information but all links just lead back to the MSDN page or the identical TechNet page.</p>