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

Remove-StoredCredential non-functional #14

Open
martin9700 opened this issue Dec 4, 2016 · 3 comments
Open

Remove-StoredCredential non-functional #14

martin9700 opened this issue Dec 4, 2016 · 3 comments

Comments

@martin9700
Copy link

Expected behavior:

Get-StoredCredential -Filter myusername | Remove-StoredCredential

Cannot get Remove-StoredCredential to work in any aspect. With or without parameters.

@aggieben
Copy link

aggieben commented Aug 31, 2017

I also can't get this to work:

Get-StoredCredential -Type DomainPassword -Target 'blah' -AsCredentialObject | Remove-StoredCredential
results in:

Remove-StoredCredential : DeleteCred failed with the error code 1168.
At line:1 char:100
+ ... <target>: -AsCredentialObject | Remove-StoredCredential -Verbose
+                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (PSCredentialManager.Common.Credential:String) [Remove-StoredCredential], Exception
    + FullyQualifiedErrorId : 1,PSCredentialManager.Cmdlet.RemoveStoredCredential

Removing the flag -AsCredentialObject silences the error, but the credential is not effected.

@nickdaniels-nlg
Copy link

nickdaniels-nlg commented Sep 24, 2018

Get-StoredCredential -Type DomainPassword -Target 'blah' -AsCredentialObject | ForEach-Object { Remove-StoredCredential -Target $_.TargetName }

@aggieben
Copy link

Ah, so the issue is that it doesn't support pipelining?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants