Solved

Script to add 'Domain Users' to the local 'Remote Desktop' group

Posted on 2006-11-27
3
519 Views
Last Modified: 2012-05-05
Howdy,

  We need to add our Doman Users group into the Local Remote Desktop Users group on every Client PC we have here, does anyone have a good effeciant idea on how to do this ? Ive heard a script being mentioned but wouldnt know where to start so if someone could give advise or point in the right direction id be great.

Cheers


 Matt
0
Comment
Question by:mattash55
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 18020332
The command to do so would be:

net localgroup "Remote Desktop Users" "DOMAINNAME\Domain Users" /add

ref: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_localgroup.mspx?mfr=true for more info

One method to accopmlish applying this to all your clients would be to use something like psexec (from sysinternals/now Microsoft):

http://www.microsoft.com/technet/sysinternals/utilities/psexec.mspx

Step 1 would be to formulate a list of all client's computername

Workstation1
Workstation2
Workstation3
[etc]

Step 2, from a 'management' console - logged in with an administrator account, run the following:

for /f %a in (c:\computerlist.txt) do psexec \\%a net localgroup "Remote Desktop Users" "DOMAINNAME\Domain Users" /add

If that step fails, we can convert it to a batch file easy enough - copy/paste the following into notepad, save it as UpdateGroup.cmd and either type the name or double-click it to run...

::begin code copy
@echo off
for /f %%a in (C:\computerList.txt) do call :process %%a
goto :eof

:process
set pc=%1
psexec \\%pc% net localgroup "Remote Desktop Users" "DOMAINNAME\Domain Users" /add
::end code copy

post back if you need more help or are having trouble (I didn't test the above, for obvious reasons)...
0
 
LVL 51

Expert Comment

by:Netman66
ID: 18021301
Restricted Groups can also do it.

On a policy attached to the Domain, right click Restricted Groups (under Computer Config>Security Settings)
Add New Group.
Browse to Domain Users to select it.
Click ok.
On the next applet, in the lower section (This group is a member of)
Add.
Manually type in - Remote Desktop Users.
Ok your way out.

When the policy applies your done.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18023304
Thanx.  Happy to have helped. :^)
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question