Enable Remote Desktop Access on client side

This will allow to enable Remote Desktop Access on client side and connect to this computer:
To do it so extract psexec.exe from https://download.sysinternals.com/files/PSTools.zip

In directory where psexec is havin a good time create EnableTerminalServer.cmd with content:
set path=%path%;%~dp0
set TS=HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server
psexec /accepteula \\%1 reg add "%TS%" /v AllowTSConnections /t REG_DWORD /d 1 /f
psexec \\%1 reg add "%TS%" /v fDenyTSConnections /t REG_DWORD /d 0 /f
psexec \\%1 reg add "%TS%" /v fAllowToGetHelp /t REG_DWORD /d 1 /f
start /w mstsc /v:%1
psexec \\%1 reg add "%TS%" /v AllowTSConnections /t REG_DWORD /d 0 /f
psexec \\%1 reg add "%TS%" /v fDenyTSConnections /t REG_DWORD /d 1 /f
psexec \\%1 reg add "%TS%" /v fAllowToGetHelp /t REG_DWORD /d 0 /f
Replace %1 with remote computer name

On Windows 7 right-click on this batch file and choose "Run As Administrator".

No comments: