One of the overloads in PowerShell for a method $Host.UI.PromptForCredentialhas a parameter options, which is a bitwise combination of values PSCredentialUIOptions.
Looking at the MSDN for PSCredentialUIOptions I find that the enumeration values include:
Default : checks the username, but not its existence or correctness.
and
ValidateUserNameSyntax : checks the syntax of the username, but not its existence or correctness.
What exactly do these descriptions mean?
By default, when he checks the username, does this mean that he simply checks that the user entered something, something in the "Username" field of the "PSCredentials" dialog box?
And for ValidateUserNameSyntax, how does it check the username syntax? Checking for invalid characters in the entered text?
I tried Google for more information, but all the links just returned to the MSDN page or on the same TechNet page.
source
share