forked from bmrf/standalone_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnable RDP.bat
More file actions
18 lines (12 loc) · 753 Bytes
/
Enable RDP.bat
File metadata and controls
18 lines (12 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
:: Script to enable Remote Desktop on a machine (must run locally)
:: For a version of this script that can be run against a REMOTE machine, see here:
:: https://github.com/bmrf/standalone_scripts/blob/master/RDP_remote_enabler.bat
:: Thanks to reddit.com/user/diggity801 for idea and initial script
:: Open the firewall to allow incoming connections
netsh advfirewall firewall set rule group="Remote Desktop" new enable=Yes
:: Disable the "Deny TS Connections" registry key
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
:: Set the service to start automatically at boot time
sc config termservice start= auto
:: Start the service
net start termservice