Skip to content
This repository was archived by the owner on Sep 1, 2021. It is now read-only.
This repository was archived by the owner on Sep 1, 2021. It is now read-only.

Running New-StoredCredential over WinRM produce error #20

@rockraft7

Description

@rockraft7

Hi,

I'm trying to execute the New-StoredCredential over WinRM session, and I'm getting this error:

ERROR: CredWrite failed with the error code 1312.
windows-2016-x64-virtualbox: ERROR: at , C:\Users\vagrant\set-proxy.ps1: line 22 ERROR: at , : line 1
windows-2016-x64-virtualbox: ERROR EXCEPTION: System.Exception: CredWrite failed with the error code 1312. ERROR EXCEPTION: at PSCredentialManager.Api.CredentialManager.WriteCred(NativeCredential credential) ERROR EXCEPTION: at PSCredentialManager.Cmdlet.NewStoredCredential.ProcessRecord()

This is the snippet I was running:

Write-Host "Setting credential manager"
Import-Module CredentialManager
New-StoredCredential -Target $env:PROXY_HOST -UserName $env:PROXY_USERNAME -Password $env:PROXY_PASSWORD -Type GENERIC -Persist ENTERPRISE

Is there any way I can work around this restriction?

Thank you

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