温馨提示×

bat批处理Net User命令怎么用

bat
小亿
361
2023-11-24 20:43:27
栏目: 编程语言
开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

在批处理中使用 net user 命令,可以管理本地计算机的用户账户。以下是一些 net user 命令的用法示例:

  1. 创建用户账户:
net user username password /add

其中,username 是要创建的用户名,password 是用户的密码。

  1. 删除用户账户:
net user username /delete

其中,username 是要删除的用户名。

  1. 禁用用户账户:
net user username /active:no

其中,username 是要禁用的用户名。

  1. 启用用户账户:
net user username /active:yes

其中,username 是要启用的用户名。

  1. 查看用户账户信息:
net user username

其中,username 是要查看的用户名。

请注意,使用 net user 命令需要以管理员身份运行批处理脚本。

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读:bat批处理if命令怎么使用

0