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))


  1. Pingback: How to know the password captured with Get-Credential - TechiBee

  2. Pingback: Compare secure strings entered through powershell - TechiBee

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.