Syed Jahanzaib Personal Blog to Share Knowledge !

May 26, 2010

Howto remotely enable RDP remote desktop connection on remote PC !

Filed under: Microsoft Related — Syed Jahanzaib / Pinochio~:) @ 8:43 AM

Just create a batch file and copy paste the following content.
You must be belong to domain admin group to perform this task.

@echo off
echo This file is used to remotely enable the RDP Remote Desktop Connection
echo on Remote client. You must be Domain Admin to perform this task.
echo All contents in this file is modified by Syed Jahanzaib
if {%1}=={} goto syntax
if {%1}=={} goto finish
set comp=%1
set remote=”\\%1\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server”
reg.exe ADD %remote% /v fDenyTSConnections /t REG_DWORD /d 0 /f>nul 2>&1
if NOT %ERRORLEVEL% EQU 0 @echo %remote% NOT found.
rem shutdown -m \\%comp% -r
goto loop
@echo Syntax: Remotereg Computername
goto loop


%d bloggers like this: