Skip to content

Help and Remove-StoredCredential Issues #4

Description

@echalone

Issues reported by @RHDHV-simon-sutcliffe on 2023-11-29:

  1. Typo in the help

Running this command get-help remove-storedcredential -full

In this part of the returned info I spotted a duplicate value

-Type
Specifies the type of credential to be deleted, possible values are [Generic, DomainPassword, DomainCertificate,
DomainVisiblePassword, DomainCertificate, DomainExtended, Maximum, MaximumEx]

  1. Issue with deleting a targeted DomainCertificate.

Using the command Get-StoredCredential -AsCredentialObject

It returns lots of information but I have included here the interesting ones.

Flags : 1
Type : DomainPassword
TargetName : Domain:target=*Session
Comment :
LastWritten : 29/11/2023 14:22:06
PaswordSize : 0
Password :
SecurePassword :
Persist : Session
AttributeCount : 0
Attributes : 0
TargetAlias :
UserName :

Flags : 129
Type : DomainCertificate
TargetName : Domain:target=*Session
Comment :
LastWritten : 29/11/2023 14:22:06
PaswordSize : 0
Password :
SecurePassword :
Persist : Session
AttributeCount : 0
Attributes : 0
TargetAlias :
UserName :&&&&&&&&&&&&&&&&&&&&&&&& (Changed this to protect the innocent)

Running this command Remove-StoredCredential -Type "DomainPassword" -target "Domain:target=*Session"

This correctly deletes only this entry

Flags : 1
Type : DomainPassword
TargetName : Domain:target=*Session
Comment :
LastWritten : 29/11/2023 14:22:06
PaswordSize : 0
Password :
SecurePassword :
Persist : Session
AttributeCount : 0
Attributes : 0
TargetAlias :
UserName :

However running this command Remove-StoredCredential -Type "DomainCertificate" -target "Domain:target=*Session"

This deleted both the above entries

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions