Enable Remote Desktop from Command-line (BAT)

Purpose: Enable Remote Desktop on Workstations from Command-line

To gain access to the unsuspecting victims.. er.. customers, you can use the magnificent built-in tool of RDP! This even allows you to do your work hidden so the customer will not actually see what you are doing, how neat is that? (Well of course this is not neat in a situation where the customer wants to show you something but lets not go into that.) To enable RDP on a remote workstation, you can use the following registry change. Like many configuration options, this can be implemented through various ways. This script can be added to SCCM as an application and use the registry change as Detection Method. This way – if the setting is already as we want – SCCM will not do anything on the workstation.

Usage: start “Configure” /wait IT_OSD_BAT_EnableRemoteDesktop.bat

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
REM *********************************************************************************
REM ** Script Name: IT_OSD_BAT_EnableRemoteDesktop
REM ** Created on: 10.10.2011
REM ** Author: Jyri Lehtonen / http://it.peikkoluola.net
REM **
REM ** Purpose: Enable Remote Desktop on Workstations from Commandline
REM **
REM ** License: This program is free software: you can redistribute it and/or modify
REM ** it under the terms of the GNU General Public License as published by
REM ** the Free Software Foundation, either version 3 of the License, or
REM ** (at your option) any later version.
REM **
REM ** This program is distributed in the hope that it will be useful,
REM ** but WITHOUT ANY WARRANTY; without even the implied warranty of
REM ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM ** GNU General Public License for more details.
REM ** 
REM ** History: 
REM ** 1.0 / Jyri Lehtonen / 10.10.2011 / Initial version.
REM **********************************************************************************
 
C:\Windows\System32\reg.exe add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
REM *********************************************************************************
REM ** Script Name: IT_OSD_BAT_EnableRemoteDesktop
REM ** Created on: 10.10.2011
REM ** Author: Jyri Lehtonen / http://it.peikkoluola.net
REM **
REM ** Purpose: Enable Remote Desktop on Workstations from Commandline
REM **
REM ** License: This program is free software: you can redistribute it and/or modify
REM ** it under the terms of the GNU General Public License as published by
REM ** the Free Software Foundation, either version 3 of the License, or
REM ** (at your option) any later version.
REM **
REM ** This program is distributed in the hope that it will be useful,
REM ** but WITHOUT ANY WARRANTY; without even the implied warranty of
REM ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM ** GNU General Public License for more details.
REM ** 
REM ** History: 
REM ** 1.0 / Jyri Lehtonen / 10.10.2011 / Initial version.
REM **********************************************************************************

C:\Windows\System32\reg.exe add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

Leave a Reply

Your email address will not be published. Required fields are marked *


− one = eight

Post Navigation