批处理脚本 - NET USER



此命令可用于以下操作 -

  • 查看特定用户帐户的详细信息。
  • 添加用户帐户。
  • 删除用户的帐户。
  • 修改用户的帐户。

语法

Net user [username [password | *] [options]] [/DOMAIN] 
username {password | *} /ADD [options] [/DOMAIN] 
username [/DELETE] [/DOMAIN]

示例

NET USER

上述命令显示在系统上定义的所有帐户。以下是上述命令的输出。

User accounts for \\WIN-50GP30FGO75
-------------------------------------------------------------------------------
Administrator     atlbitbucket      Guest
The command completed successfully.

net user Guest

上述命令显示在系统上定义的 Guest 帐户的详细信息。以下是上述命令的输出。

输出

User name                  Guest
Full Name
Comment                    Built-in account for guest access to the computer/domain
User's comment
Country/region code        000 (System Default)
Account active             No
Account expires            Never

Password last set          1/4/2016 9:34:25 AM
Password expires           Never
Password changeable        1/4/2016 9:34:25 AM
Password required          No
User may change password   No

Workstations allowed       All
Logon script
User profile
Home directory
Last logon                Never

Logon hours allowed       All

Local Group Memberships   *Guests
Global Group memberships  *None
The command completed successfully.
batch_script_network.htm
广告