Scripting RDC

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Folks:



Looking for a script (DOS/VBscript/etc ) that would allow me to remotely
switch on Remote Desktop Connection (RDC) on a windows XP machine



Thanks,
John.
 
This might not be exactly what you are looking for, but we have a
freeware tool that can do this for you:

http://www.intelliadmin.com/blog/2006/06/remotely-enable-remote-desktop.html

I believe this script will also do the trick:

Const ENABLE_CONNECTIONS = 1

strComputer = "COMPUTER_NAME"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}\\" & strComputer &
"\root\cimv2")

Set colItems = objWMIService.ExecQuery _
("Select * from Win32_TerminalServiceSetting")

For Each objItem in colItems
errResult = objItem.SetAllowTSConnections(ENABLE_CONNECTIONS)
Next


Steve Wiseman
 
Back
Top