EncryptDecryptUserCredentials

$securepassword = Read-Host -Prompt “enter Password” -AsSecureString
$username= “Domainuser”
$credentials = New-Object System.Management.Automation.PSCredential -ArgumentList $username,$securepassword
$plainpassword = $credentials.GetNetworkCredential().password
$plainpassword

Leave a Reply

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