0
点赞
收藏
分享

微信扫一扫

Windows命令行创建账号、加入管理员组、设置密码永不过期和禁止修改密码

用以下批处理,把创建账号、加入管理员组、设置密码永不过期和禁止修改密码一次性完成。

用户是abc,密码是pass!

net user abc pass! /add /passwordchg:No
wmic.exe UserAccount Where Name='abc' Set PasswordExpires=false
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /f /v PasswordExpires /t REG_SZ /d "C:\\Windows\\System32\\wbem\\WMIC.exe UserAccount Where Name='abc' Set PasswordExpires=false"

举报

相关推荐

0 条评论