We recognized, after updating to 4.4.29, that your change in commit 0137baf8a714f351fec42e7e80ec15c4d55224ad of the PasswordResult class broke the ToPSCredential() method for already encrypted passwords.
After calling the method ToPSCredential() the already encrypted password (not using setplaintextpassword Config) gets encrypted again, so if you call this, the last step (method GetNetworkCredential() from PSCredential) should get the clear text password, but the password is an EncryptedPassword, so the PSCredential Object is not usable.
Hi @dnewsholme
We recognized, after updating to 4.4.29, that your change in commit 0137baf8a714f351fec42e7e80ec15c4d55224ad of the
PasswordResult
class broke theToPSCredential()
method for already encrypted passwords.After calling the method
ToPSCredential()
the already encrypted password (not using setplaintextpassword Config) gets encrypted again, so if you call this, the last step (methodGetNetworkCredential()
from PSCredential) should get the clear text password, but the password is anEncryptedPassword
, so the PSCredential Object is not usable.In 4.4.28 it is working, so it must be related to your change from yesterday. ($this.Password -> $this.Password.Password)
I was about to have a look at it myself, but I don't have much time for that right now, maybe you could have a look at it?
(Edit: you could also use
-isnot [string]
instead of.GetType().Name -ne 'String'
)Thanks, René