How to update Registry with REG ADD command

2

I need to do set this registry value from command line:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation]
"AllowSavedCredentialsWhenNTLMOnly"=dword:00000001
"ConcatenateDefaults_AllowSavedNTLMOnly"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowSavedCredentialsWhenNTLMOnly]
"1"="TERMSRV/* "

I can't seem to get the REG ADD command right for this.

I am trying to allow saved password for RDP connections.

Ali Syed

Posted 2016-04-19T09:03:40.960

Reputation: 161

Answers

3

The general syntax (as shown in reg add /?) is:

reg add <key> [/v <value>] [/t <type>] [/d <data>]

So your .reg file corresponds to:

reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation /v AllowSavedCredentialsWhenNTLMOnly /t REG_DWORD /d 0x00000001
reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation /v ConcatenateDefaults_AllowSavedNTLMOnly /t REG_DWORD /d 0x00000001
reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowSavedCredentialsWhenNTLMOnly /v 1 /t REG_SZ /d "TERMSRV/*"

(HKLM is a shortcut for HKEY_LOCAL_MACHINE.)

Of course you could just reg import the same .reg fileā€¦ or use Group Policy, if you're trying to do this within Active Directory.

user1686

Posted 2016-04-19T09:03:40.960

Reputation: 283 655