You are here:
ActiveXperts.com > ActiveXperts Network Monitor > WindowsManagement > Scripts > Networking > Terminal Services
Quicklinks
NOTE: ActiveXperts Network Monitor ships with a large collection of VBScript scripts to monitor any aspect of your network. Most VBScript scripts also have a PowerShell implementation. Download Now »
Const GUEST_ACCESS = 0
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_TSPermissionsSetting")
For Each objItem in colItems
errResult = objItem.AddAccount("fabrikam\bob", GUEST_ACCESS)
Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_TerminalServiceSetting")
For Each objItem in colItems
errResult = objItem.AddDirectConnectLicenseServer("atl-ts-01")
Next