Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

retrive password ($credential) using powershell command doest work in all server ?

$
0
0

Hi,

below command for getting the password via powershell works for 1 serverbut throws and error for other server machine ?

Commnand - $credential.GetNetworkCredential().password

Error -

You cannot call a method on a null-valued expression.
At line:1 char:33
+ $credential.GetNetworkCredential <<<< ().password
    + CategoryInfo          : InvalidOperation: (GetNetworkCredential:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull


sid


Viewing all articles
Browse latest Browse all 15028

Trending Articles