studmuffinbob Posted June 2, 2008 Share Posted June 2, 2008 I have been searching and searching for a batch file or script that I can run at startup or runonce that will enable Remote Desktop and also add only a specific user/group that will have the remote desktop ability, so if anyone has some info on this matter I would greatly appreciate it.V/R,Studmuffinbob Link to comment Share on other sites More sharing options...
ryath Posted June 2, 2008 Share Posted June 2, 2008 What you first should look for is the registry changes required to enable remote desktop. Put them into a .reg file. Then look up how to apply a .reg file via a batch file.Both are quite easy to lookup on google. Link to comment Share on other sites More sharing options...
IcemanND Posted June 3, 2008 Share Posted June 3, 2008 Enable remote desktop:strComputer = "."set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")set colItems = objWMI.ExecQuery("Select * from Win32_TerminalServiceSetting")for each objItem in colItems intRC = objItem.SetAllowTSConnections(true) if intRC then WScript.Echo "Error enabling Remote Desktop" end ifnext You don't say if you want to add a local user/group or and AD user/group which is slightly different.Don't forget to turn on the firewall exception for remote desktop also. And make sure that the No exceptions allowed box is not checked. Link to comment Share on other sites More sharing options...
pierce14u2 Posted June 3, 2008 Share Posted June 3, 2008 (edited) If you are using an unattended install file you can add the following to it[TerminalServices]AllowConnections=1 If your using a Active Directory domain you can make a group policy that specifies each user or group that is allowed. Edited June 3, 2008 by pierce14u2 Link to comment Share on other sites More sharing options...
studmuffinbob Posted June 3, 2008 Author Share Posted June 3, 2008 I am using Active Directory domain, and I only want one group to be able to remote into the machines. I am also trying to make this work with an Unattended Windows server 2003 installation. Thank you for all the responses I really appreciate it.V/R,Studmuffinbob Link to comment Share on other sites More sharing options...
IcemanND Posted June 3, 2008 Share Posted June 3, 2008 the easiest way then would likely be to use the net command.net localgroup "Remote Desktop Users" "domain\My TS Users" /addreplace domain with your domain name and "my ts users" to your group name. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now