SetAllowTSConnections

  • Thread starter Thread starter Ty Moffett
  • Start date Start date
T

Ty Moffett

I am trying to write a very simple VBScript to enable Remote Desktop on a
given Windows XP machine.

I've found the SetAllowTSConnections method in the
Win32_TerminalServiceSetting namespace but I don't understand how to use it.

I have a regisry hack that does the same thing but I thought I'd try to do
it the right way instead.


Can anyone help me out?
 
For those that might be interested here is the code.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "\\" & strComputer &
"\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from
Win32_TerminalServiceSetting")
For Each objItem In colItems
objItem.SetAllowTSConnections(1)
Next
 
Back
Top