Skip to content

Attempting to remotely use stored credentials results in 1312 error #6

Description

@AaronTilton

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 | Out-File -FilePath
3: On the local machine, attempt to execute the script on the remote machine via scheduled task, etc.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions