Remotely Enable Remote Desktop


This is how you can do it with a single command:

reg.exe ADD "\\\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

Notes:
Replace with the actual computer name. Ensure you run this as a user that has domain admin privileges.

If you have a list of computers you want to do this on, create the list of computers you want to enable remote desktop for and put it in a file called computerlist.txt. Save the following code to a bat file (call it anything that suits you) and run it.

for /f %%i in (computerlist.txt) do reg.exe ADD "\\%%i\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: