Security issue with PowerShell
Hi guys,
after (too) long time I can finally return to Powershell (I spend few months creating batch framework to manage citrix servers, right now it is about 980 scripts).
I was playing with Get-Credential:
$Operator = get-credential
I provided my username/password. If I have a look at object, I can see Password property and GetPassword() method. I tried this, Output is in System.Security.SecureString.
I was just thinking how PowerShell is handling explicit authentication, so I had a look at available properties and methods - GetNetworkCredential grab my eye, so I tried it. And I was really surprised by output:
mzugec>$operator.GetNetworkCredential()
UserName Password Domain
-------- -------- ------
mzugec YouPwdInPlainText MyDomain
Replace YouPwdInPlainText with your actual password! So be aware, if you are using get-credentials, it is very easy to retrieve your actual password!