Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Modify Terminal Services ModeContent of Modify Terminal Services Mode.vbsMD5 Hash: AEB9AFBC5EBEEB0B22C64F652432E1B4 |
||
' Description: Enables per-session licensing for Terminal Services. To enable per-device licensing, pass the value 2 (rather than 4) to the ChangeMode method.
Const PER_SESSION = 4 strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery _ ("Select * from Win32_TerminalServiceSetting") For Each objItem in colItems errResult = objItem.ChangeMode(PER_SESSION) Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |