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.
echo All contents in this file is modified by Syed Jahanzaib aacable@hotmail.com
echo.
echo.
setlocal
if {%1}=={} goto syntax
:loop
if {%1}=={} goto finish
set comp=%1
set remote=”\\%1\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server”
shift
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
:syntax
@echo Syntax: Remotereg Computername
goto loop
:finish
endlocal

=====================================================

Blog at WordPress.com.