PSHostUserInterface.PromptForCredential Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
PromptForCredential(String, String, String, String) |
Prompt for credentials. |
PromptForCredential(String, String, String, String, PSCredentialTypes, PSCredentialUIOptions) |
Prompt for credential. |
PromptForCredential(String, String, String, String)
Prompt for credentials.
public:
abstract System::Management::Automation::PSCredential ^ PromptForCredential(System::String ^ caption, System::String ^ message, System::String ^ userName, System::String ^ targetName);
public abstract System.Management.Automation.PSCredential PromptForCredential (string caption, string message, string userName, string targetName);
abstract member PromptForCredential : string * string * string * string -> System.Management.Automation.PSCredential
Public MustOverride Function PromptForCredential (caption As String, message As String, userName As String, targetName As String) As PSCredential
Parameters
- caption
- String
Caption for the message.
- message
- String
Text description for the credential to be prompt.
- userName
- String
Name of the user whose credential is to be prompted for. If set to null or empty string, the function will prompt for user name first.
- targetName
- String
Name of the target for which the credential is being collected.
Returns
User input credential.
See also
- PromptForChoice(String, String, Collection<ChoiceDescription>, Int32)
- PromptForCredential(String, String, String, String, PSCredentialTypes, PSCredentialUIOptions)
- ReadLine()
- ReadLineAsSecureString()
- Prompt(String, String, Collection<FieldDescription>)
Applies to
PromptForCredential(String, String, String, String, PSCredentialTypes, PSCredentialUIOptions)
Prompt for credential.
public:
abstract System::Management::Automation::PSCredential ^ PromptForCredential(System::String ^ caption, System::String ^ message, System::String ^ userName, System::String ^ targetName, System::Management::Automation::PSCredentialTypes allowedCredentialTypes, System::Management::Automation::PSCredentialUIOptions options);
public abstract System.Management.Automation.PSCredential PromptForCredential (string caption, string message, string userName, string targetName, System.Management.Automation.PSCredentialTypes allowedCredentialTypes, System.Management.Automation.PSCredentialUIOptions options);
abstract member PromptForCredential : string * string * string * string * System.Management.Automation.PSCredentialTypes * System.Management.Automation.PSCredentialUIOptions -> System.Management.Automation.PSCredential
Public MustOverride Function PromptForCredential (caption As String, message As String, userName As String, targetName As String, allowedCredentialTypes As PSCredentialTypes, options As PSCredentialUIOptions) As PSCredential
Parameters
- caption
- String
Caption for the message.
- message
- String
Text description for the credential to be prompt.
- userName
- String
Name of the user whose credential is to be prompted for. If set to null or empty string, the function will prompt for user name first.
- targetName
- String
Name of the target for which the credential is being collected.
- allowedCredentialTypes
- PSCredentialTypes
Types of credential can be supplied by the user.
- options
- PSCredentialUIOptions
Options that control the credential gathering UI behavior
Returns
User input credential.
See also
- PromptForChoice(String, String, Collection<ChoiceDescription>, Int32)
- PromptForCredential(String, String, String, String)
- ReadLine()
- ReadLineAsSecureString()
- Prompt(String, String, Collection<FieldDescription>)