Solved

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

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Set OWA language and time zone in Exchange for individuals, all users or per database.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

770 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