Last active
November 11, 2019 15:23
-
-
Save archaeogeek/e226d4e071a2d4f6abc8fc9dc718eca7 to your computer and use it in GitHub Desktop.
Get all windows local groups
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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