Prompting for Credentials

suggest change

To prompt for credentials, you should almost always use the Get-Credential cmdlet:

$credential = Get-Credential

Pre-filled user name:

$credential = Get-Credential -UserName 'myUser'

Add a custom prompt message:

$credential = Get-Credential -Message 'Please enter your company email address and password.'

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Handling secrets and credentials:
*Prompting for Credentials

Table Of Contents
11Handling secrets and credentials
19XML