Created
October 9, 2020 04:17
-
-
Save sebastiansommer/a24f0a2cdf60f9851a05c5c7e304866f to your computer and use it in GitHub Desktop.
Create batch windows users and add to remote desktop group
This file contains hidden or 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
set number=0 | |
:start_loop | |
set /A number=%number%+1 | |
if %number% GTR 50 goto end | |
net user user%number% foo /add /comment:"batch" /expires:never /fullname:"User %number%" /passwordchg:no | |
net localgroup "Remote Desktop Users" user%number% /add | |
goto start_loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment