PSCredentialUIOptions Enumeration

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Defines the options that are available, such as different validation options, when prompting for credentials.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:   System.Management.Automation
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

[FlagsAttribute]
public enum class PSCredentialUIOptions

Member nameDescription
AlwaysPrompt

Always prompt, even if a persisted credential was available.

Default

Validates the username, but not its existence or correctness.

None

Performs no validation.

ReadOnlyUserName

Username is read-only, and the user may not modify it.

ValidateUserNameSyntax

Validates the username, but not its existence. or correctness

These constants are used when prompting for credentials using the PromptForCredential method.

Return to top
Show: