Created
July 25, 2017 08:43
-
-
Save lennartvdd/b764ab6c48c5145a1477832d07b44dab to your computer and use it in GitHub Desktop.
Remotely Enable RDP
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
@echo off | |
SET computer=\\COMPUTERNAME | |
REM sc %computer% config remoteregistry start= manual | |
REM sc %computer% start remoteregistry | |
REM psexec %computer% net start RemoteRegistry | |
psexec %computer% reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0 | |
psexec %computer% netsh advfirewall firewall set service remoteadmin enable | |
psexec %computer% netsh advfirewall firewall set service remotedesktop enable | |
REM sc %computer% stop remoteregistry | |
REM sc %computer% config remoteregistry start= disabled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment