Skip to content

Instantly share code, notes, and snippets.

@spawnrider
Created April 16, 2018 18:49
Show Gist options
  • Save spawnrider/5540d6a3a88d9d10679f4f43875b8be4 to your computer and use it in GitHub Desktop.
Save spawnrider/5540d6a3a88d9d10679f4f43875b8be4 to your computer and use it in GitHub Desktop.
Activate Remote Desktop Connection using PsExec
# PSEXEC is a standalone executable file that allows you to run commands on remote machines.
# You can download the tool from here:
# http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
# Open a command line and type the follwoing:
psexec \\machinename reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0
psexec \\remotecomputername netsh firewall set service remoteadmin enable
psexec \\remotecomputername netsh firewall set service remotedesktop enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment