Tales from the Datacenter
RSS

Editing Local Groups via the Command Line

June 10th, 2010 Posted in How To, Microsoft, Miscellaneous, Work

I use MDT to deploy our servers here at the office and I’m frequently forgetting build steps – namely adding a certain group to the local Administrators group on all the servers I build.  I was looking for a way to script it and was pleasantly surprised to find out that it’s just a single command that can be run at the command line.

The command:

net localgroup Administrators /add "domain\domain group"

If you want to edit a group other than the local Administrators group, just change “Administrators” above to whatever the appropriate group may be.

Post a Comment