Solved

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

Posted on 2010-08-30
4
381 Views
Last Modified: 2012-05-10
please advise
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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
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…

733 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