Skip to content

Instantly share code, notes, and snippets.

@lennartvdd
Created July 25, 2017 08:43
Show Gist options
  • Save lennartvdd/b764ab6c48c5145a1477832d07b44dab to your computer and use it in GitHub Desktop.
Save lennartvdd/b764ab6c48c5145a1477832d07b44dab to your computer and use it in GitHub Desktop.
Remotely Enable RDP
@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