From 544f5b6208b9a3b6062a4ef34ebc77682f62bbaf Mon Sep 17 00:00:00 2001 From: kaptainkommie Date: Fri, 28 Sep 2018 11:01:31 -0400 Subject: [PATCH] Changed Persist to correct value Changed -Persist LOCAL_MACHINE to -Persist LocalMachine This resolves errors received when the the TFS module tries to create new credentials: https://github.com/davotronic5000/PowerShell_Credential_Manager/issues/15 --- TFS/New-TFSCredential.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TFS/New-TFSCredential.ps1 b/TFS/New-TFSCredential.ps1 index fb6ac10..2c34064 100644 --- a/TFS/New-TFSCredential.ps1 +++ b/TFS/New-TFSCredential.ps1 @@ -21,7 +21,7 @@ function New-TFSCredential { if (($global:tfs.root_url -eq '') -or ($global:tfs.root_url -eq $null)) { throw 'You must set $global:tfs.root_url in order to store credentials' } Write-Verbose "Storing credential for target '$($global:tfs.root_url)'" - New-StoredCredential -Target $global:tfs.root_url -UserName $Credential.UserName -Password $Credential.GetNetworkCredential().Password -Persist LOCAL_MACHINE | Out-Null + New-StoredCredential -Target $global:tfs.root_url -UserName $Credential.UserName -Password $Credential.GetNetworkCredential().Password -Persist LocalMachine | Out-Null return $Credential }