Monday, 22 September 2014

Powershell UI : PSHostUserInterface.PromptForCredential Method


PSHostUserInterface.PromptForCredential Method

prompts the user for credentials for a specified target. The variants of this method can be used to prompt the user with a specified prompt window caption, prompt message, user and target name, credential types allowed to be returned, and user interface (UI) behavior options.



Parameters

caption
The caption for the message window.
message
The text of the message.
userName
The user name whose credential is to be prompted for. If this parameter set to null or an empty string, the function prompts for the user name first.
targetName
The name of the target for which the credential is collected.
************************************************************************************************

PSHostUserInterface.PromptForCredential Method (String, String, String, String, PSCredentialTypes, PSCredentialUIOptions)

Parameters

caption
The caption for the message window.
message
The text of the message.
userName
The user name whose credential is to be prompted for. If this parameter set to null or an empty string, the function will prompt for the user name first.
targetName
The name of the target for which the credential is collected.
allowedCredentialTypes
A bitwise combination of the PSCredentialTypes enumeration values that identify the types of credentials that can be returned.
options
A bitwise combination of the PSCredentialUIOptions enumeration values that identify the UI behavior when it gathers the credentials.
************************************************************************************************






No comments:

Post a Comment