[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2009-07-13
3
Medium Priority
?
665 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
[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 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 71

Accepted Solution

by:
Chris Dent earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

656 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