Contact Info

Crumbtrail » Administration » Powershell » Powershell 3.0 » Get-Credential

Get-Credential - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »


Short description
Gets a credential object based on a user name and password.

Get-Credential [-Credential] <PSCredential> [<CommonParameters>]
Get-Credential [[-UserName] <String>] -Message <String> [<CommonParameters>]

The Get-Credential cmdlet creates a credential object for a specified user name and password. You can use the credentia
l object in security operations.

Beginning in Windows PowerShell 3.0, you can use the Message parameter to specify a customized message on the dialog bo
x that prompts the user for their name and password.

The Get-Credential cmdlet prompts the user for a password or a user name and password. By default, an authentication di
alog box appears to prompt the user. However, in some host programs, such as the Windows PowerShell console, you can pr
ompt the user at the command line by changing a registry entry. For more information about this registry entry, see the
 notes and examples.