All Forums >> [Scripting] >> WSH & Client Side VBScript >> Script to add permissions to RDP-Tcp connection Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Hi all, I have 150 terminal servers and want to add a specific user to the RDP-TCP Permissions. Terminal Server Configuration->Connection settings->RDP-TCP-> Properties->Permissions. I was able to do it for the 2003 Terminal servers and the script works fine for the 2003 terminal server but not for 2000.
Below is the script that i am using . any ideas how do i implement the same for 2000 Terminal servers.
set RDPObj = GetObject("winmgmts:{impersonationLevel=impersonate}!Win32_TSPermissionsSetting.TerminalName='RDP-Tcp'") RDPobj.AddAccount "Domain\User", X
Where "Domain\User", X:
• Domain\User: Target Domain and Account (user or group) to which permissions are to be granted.
At a command prompt, type wmic. Note: If it is not in the path, add %SystemRoot%\System32\Wbem\, or change to that directory and run wmic. 2. At the wmic:root\cli> prompt, type the following command: PATH WIN32_TSPermissionsSetting.TerminalName="RDP-TCP" call AddAccount "Domain\user",X
If so can you call it from the run or exec methods?