Skip to content

Enable RDP From CMD Line

Published: at 05:08 AM

I ran into a situation this morning where I needed to quickly enable RDP on a remote machine. Sysinternals to the rescue!

psexec -u domain\administrator -p "P@ssw0rd" \\remotecomputername.domain.com reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0
psexec -u domain\administrator -p "P@ssw0rd" \\remotecomputername.domain.com netsh firewall set service remoteadmin enable