PowerShell_Credential_Manager
PowerShell_Credential_Manager copied to clipboard
Attempting to remotely use stored credentials results in 1312 error
How to reproduce:
1: On the remote machine, store credentials via New-StoredCredential -Username <username> -Password <password> -Target <target> -Persist LocalMachine
2: On the remote machine, create a script that accesses the credentials i.e., `Get-StoredCredential -target
Expected results
The script can access the credentials and store the output of the Get-StoredCredential command i.e.
UserName Password
-------- --------
<username>@<domain> System.Security.SecureString
Actual results
Error message:
CredRead failed with the error code 1312.
+ CategoryInfo : InvalidOperation: (SCC:String) [Get-StoredCredential], Exception
+ FullyQualifiedErrorId : 1,PSCredentialManager.Cmdlet.GetStoredCredential
WARNING: Unable to convert Credential object without username or password to PSCredential object