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

please advise
itbabeAsked:
Who is Participating?
 
Krzysztof PytkoSenior Active Directory EngineerCommented:
domain environment or workgroup ?
0
 
shalabhsharmaCommented:
net localgroup administrators "domain\security groups" /add
0
 
karephreIT Specialist (Server Management)Commented:
net localgroup administrators username /add

fi you are on vista or windows 7 Make sure you right click and start CMD in Administrator  
0
 
boing40001Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.