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.

Documentation Specifies LOCAL_MACHINE, looks like Enumerator name is actually LocalMachine #15

@rayterrill

Description

@rayterrill

Documentation link showing LOCAL_MACHINE: https://github.com/davotronic5000/PowerShell_Credential_Manager/wiki/New-StoredCredential

Error when using LOCAL_MACHINE:

PS C:\WINDOWS\system32> New-StoredCredential -Target O365 -UserName [email protected] -Persist LOCAL_MACHINE -Password mySuperSecretPassword
New-StoredCredential : Cannot bind parameter 'Persist'. Cannot convert value
"LOCAL_MACHINE" to type "PSCredentialManager.Common.Enum.CredPersist". Error:
"Unable to match the identifier name LOCAL_MACHINE to a valid enumerator name.
Specify one of the following enumerator names and try again:
Session, LocalMachine, Enterprise"
At line:1 char:82
+ ...  -UserName [email protected] -Persist LOCAL_MACHINE -Passwo ...
+                                                     ~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-StoredCredential], Par
   ameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,PSCredentialManag
   er.Cmdlet.NewStoredCredential

Switched to LocalMachine as indicated by error message, working now.

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