Show password in plaintext, by using Get-Credential in PowerShell
March 23, 2010
2 Comments
To show the password from the Get-Credentials cmdlet in plaintext, use the following PowerShell script:
$credential = Get-Credential
[Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($credential .Password))
Tags: PowerShell
2 Replies to “Show password in plaintext, by using Get-Credential in PowerShell”