Created
March 25, 2017 04:14
-
-
Save melt7777/2907b4894483efc14f5cb4365ccf7426 to your computer and use it in GitHub Desktop.
Enable RDP Connections on a specified port from an elevated Command Prompt on Windows 7/8/10/2008/2012
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################# | |
# ENABLE RDP CONNECTIONS ON SPECIFIED PORT FROM ELEVATED COMMAND PROMPT - WINDOWS 10 | |
############################################################# | |
# example: for port 20000 | |
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f | |
netsh advfirewall firewall add rule name="rdp" dir=in action=allow protocol=TCP localport=20000 | |
reg add "HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v PortNumber /t REG_DWORD /d 0x4e20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment