Solved

I need an automated way to add users to the "Remote Desktop Users"-group.

Posted on 2009-07-13
3
657 Views
Last Modified: 2013-11-10
I need an automated way to add users to the "Remote Desktop Users"-group of 10 pc's.
I have an account that has administrative privileges on these pc's and want to add them easily.
0
Comment
Question by:itbabe
  • 2
3 Comments
 
LVL 7

Expert Comment

by:ManicD
ID: 24839118
C:\>net group /?
The syntax of this command is:


NET GROUP
[groupname [/COMMENT:"text"]] [/DOMAIN]
          groupname {/ADD [/COMMENT:"text"] | /DELETE}  [/DOMAIN
          groupname username [...] {/ADD | /DELETE} [/DOMAIN]


thus you need the command

net group Group_Name User_name /add
0
 
LVL 7

Expert Comment

by:ManicD
ID: 24839126
Sorry, forgot to credit my link

http://www.ss64.com/nt/net_useradmin.html
0
 
LVL 70

Accepted Solution

by:
Chris Dent earned 500 total points
ID: 24840265

If you had a list of computer names in a text file you could do something like this in PowerShell...

$User = "WinNT://yourdomain/username"

Get-Content "ComputerList.txt" | %{
  $LocalGroup = [ADSI]"WinNT://$_/Remote Desktop Users"
  $LocalGroup.Add($User)
}

Chris
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This is about my first experience with programming Arduino.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

947 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now