Skip to content
This repository has been 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

Open
rayterrill opened this issue Mar 1, 2017 · 0 comments

Comments

@rayterrill
Copy link

rayterrill commented Mar 1, 2017

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.

spreadred pushed a commit to spreadred/TFS that referenced this issue Sep 28, 2018
Changed -Persist LOCAL_MACHINE to -Persist LocalMachine

This resolves errors received when the the TFS module tries to create new credentials:

davotronic5000/PowerShell_Credential_Manager#15
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

1 participant