Skip to content

Instantly share code, notes, and snippets.

@archaeogeek
Last active November 11, 2019 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save archaeogeek/e226d4e071a2d4f6abc8fc9dc718eca7 to your computer and use it in GitHub Desktop.
Save archaeogeek/e226d4e071a2d4f6abc8fc9dc718eca7 to your computer and use it in GitHub Desktop.
Get all windows local groups
net localgroup > C:\tmp\localgroups.txt
add multiple groups from a list (admin command prompt):
FOR /f %G IN (D:\Astun\gislocalgroups.txt) DO NET LOCALGROUP %G /COMMENT:"iShareGIS local group %G" /ADD
add user to all groups:
FOR /f %G IN (D:\Astun\gislocalgroups.txt) DO NET LOCALGROUP %G username /ADD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment