PowerTip: Get password from PowerShell credential object

Doctor Scripto

Summary: Learn how to retrieve the password from a Windows PowerShell credential object.

Hey, Scripting Guy! Question I am having a problem connecting to an application via Windows PowerShell. How can I verify the user name and password that was supplied to the credential object?

Hey, Scripting Guy! Answer Assuming you have permissions to the object, you can use the GetNetworkCredential method, for example:

$a = Get-Credential

$a.GetNetworkCredential() | fl *

0 comments

Discussion is closed.

Feedback usabilla icon