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

please advise
itbabeAsked:
Who is Participating?
 
Krzysztof PytkoConnect With a Mentor Active Directory EngineerCommented:
domain environment or workgroup ?
0
 
shalabhsharmaConnect With a Mentor Commented:
net localgroup administrators "domain\security groups" /add
0
 
karephreConnect With a Mentor IT 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
 
boing40001Connect With a Mentor Commented:
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
All Courses

From novice to tech pro — start learning today.