Enable remote desktop in the remote pc

Copy and paste the below text and save the file as .bat
Give the computer name as per the syntax.
 
————————————————-
@echo off
@echo Remote RDP Enable Script
@echo ————————
@echo.
setlocal
if {%1}=={} goto syntax
:loop
if {%1}=={} goto finish
set remote="\\%1\HKEY_LOCAL_MACHINE\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.
goto loop
:syntax
@echo No computer name or host name specified.
@echo.
@echo Syntax: RemoteDesktop Computer1 [Computer2 …. Computern]
goto loop
:finish
endlocal
——————————–
We can also disable with the same batch file by changing the value
 
 
 
 
Advertisements

About Murugan B Iyyappan

Working as a Technical Specialist - Citrix solutions architect with 13 years of experience in the IT industry. Expertise in Citrix XenApp and VMware in Windows platform.
This entry was posted in Citrix XenApp, Citrix XenDesktop and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s