1

I'm trying to add credentials for remote desktop connection via the cmdkey command

cmdkey /add:TERMSRV/myserver /user:MyUser /pass:MyPassword

I wanted to check that this added correctly via the Credentials Manager GUI control.exe /name Microsoft.CredentialManager then Windows Credentials but the entry is saved with the persistence type of "Enterprise" which I don't think the Remote Desktop Client on Windows 10 likes. I have the belief that by modifying this to be "Local Computer" will solve the issue.

enter image description here

How can I modify the persistence type from "Enterprise" to "Local Computer"? A scriptable solution is preferred.

Frank Fu
  • 163
  • 1
  • 2
  • 7

1 Answers1

2

I don't think you can modify the persistence type for existing credential.

But you can create a new credential through powershell with proper persistence. you need to install the below powershell module. https://www.powershellgallery.com/packages/CredentialManager/2.0 and then run the below cmdlet.

New-StoredCredential -Target Test -UserName test -Password test -Comment "test" -Persist Enterprise
Suman Ghosh
  • 136
  • 2