一、建立用户的命令行语法:
建立用户:net user 用户名 密码 /add
示例: net user test 123 /add
创建名字为test并且密码为123的用户
二、新建一个文本文件(.txt)
三、编写写批量注册脚本,例如:
::关闭密码复杂度
@echo off & cd /d %~dp0
::设置dao密码长度,长度0 不要求密码,值最多 14
set Length=0
::启用或禁用dao复专杂性属要求,1 启用,0 禁用
set Complexity=0
(echo [Version]
echo signature="$CHICAGO$"
echo [System Access]
echo MinimumPasswordLength = %Length%
echo PasswordComplexity = %Complexity%)>Password.inf
secedit /configure /db Password.sdb /cfg Password.inf /log Password.log
del Password.*
::新建用户
net user nc1 nc1 /add
net user nc2 nc2 /add
net user nc3 nc3 /add
net user nc4 nc4 /add
net user nc5 nc5 /add
net localgroup "Remote Desktop Users" nc1 /add
net localgroup "Remote Desktop Users" nc2 /add
net localgroup "Remote Desktop Users" nc3 /add
net localgroup "Remote Desktop Users" nc4 /add
net localgroup "Remote Desktop Users" nc5 /add
net user nc1 /active:yes
net user nc2 /active:yes
net user nc3 /active:yes
net user nc4 /active:yes
net user nc5 /active:yes
net user nc1 /passwordchg:no
net user nc2 /passwordchg:no
net user nc3 /passwordchg:no
net user nc4 /passwordchg:no
net user nc5 /passwordchg:no
wmic.exe UserAccount Where Name="nc1" Set PasswordExpires="false"
wmic.exe UserAccount Where Name="nc2" Set PasswordExpires="false"
wmic.exe UserAccount Where Name="nc3" Set PasswordExpires="false"
wmic.exe UserAccount Where Name="nc4" Set PasswordExpires="false"
wmic.exe UserAccount Where Name="nc5" Set PasswordExpires="false"
pause