다음을 통해 공유


PSHostUserInterface.PromptForCredential Method

Definition

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

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

Applies to