Solved

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

Posted on 2009-07-13
3
656 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Set OWA language and time zone in Exchange for individuals, all users or per database.
"Migrate" an SMTP relay receive connector to a new server using info from an old server.
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

758 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

19 Experts available now in Live!

Get 1:1 Help Now