批次處理Net User命令

2019-10-16 22:58:56

批次處理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.

以下命令顯示了在系統上定義的Guest帳戶的詳細資訊。

net user 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.