Solved

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

Posted on 2010-08-30
4
376 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 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

20 Experts available now in Live!

Get 1:1 Help Now