Batch Script Add Windows Users using Netsh

This content is 3 years old. Technology changes with time. Keep that in mind as you read this article.

The following batch script will add a group of users to Windows, set no password, and require a password change at first logon.

@echo off
setlocal enabledelayedexpansion

set user1=John Q. Smith
set user2=Jane Doe
set user3=Joe Montana
set user4=Alicia Silverstone

set users=(user1 user2 user3 user4 user5 user6)

for %%u in %users% do (
  echo net user %%u /logonpasswordchg:yes /fullname:"!%%u!" /add

Posted by Rich

Father, geek, caffeine addict, IT guy, photographer and after-hours hacker...

Leave a Reply

Your email address will not be published. Required fields are marked *