Solved

I need a dos command to add members (other groups) to a group

Posted on 2010-08-30
4
379 Views
Last Modified: 2012-05-10
please advise
0
Comment
Question by:itbabe
4 Comments
 
LVL 39

Accepted Solution

by:
Krzysztof Pytko earned 125 total points
ID: 33559063
domain environment or workgroup ?
0
 
LVL 9

Assisted Solution

by:shalabhsharma
shalabhsharma earned 125 total points
ID: 33559104
net localgroup administrators "domain\security groups" /add
0
 
LVL 3

Assisted Solution

by:karephre
karephre earned 125 total points
ID: 33569034
net localgroup administrators username /add

fi you are on vista or windows 7 Make sure you right click and start CMD in Administrator  
0
 
LVL 5

Assisted Solution

by:boing40001
boing40001 earned 125 total points
ID: 33609875
i think you can't add a group to another group using the net command.
You can do this with a simple vbs ( change the group names as you like):

On Error Resume Next

'get main objects/variables

Set ws = WScript.CreateObject ( "WScript.Shell" )
compname = ws.ExpandEnvironmentStrings ( "%COMPUTERNAME%" )
Set AdminGroup = GetObject ( "WinNT://" & compname & "/Administrators,group" )

'add domain groups to local admin group
AdminGroup.Add ( "WinNT://domain/Desktop_Admin,group" )
'End of the Script
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Selective Copy and overwrite 7 58
DOS expert? 3 55
For loop to add numbers 3 74
Command prompt output to variable? 9 45
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

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