- Batch Script Tutorial
- Batch Script - Home
- Batch Script - Overview
- Batch Script - Environment
- Batch Script - Commands
- Batch Script - Files
- Batch Script - Syntax
- Batch Script - Variables
- Batch Script - Comments
- Batch Script - Strings
- Batch Script - Arrays
- Batch Script - Decision Making
- Batch Script - Operators
- Batch Script - DATE & TIME
- Batch Script - Input / Output
- Batch Script - Return Code
- Batch Script - Functions
- Batch Script - Process
- Batch Script - Aliases
- Batch Script - Devices
- Batch Script - Registry
- Batch Script - Network
- Batch Script - Printing
- Batch Script - Debugging
- Batch Script - Logging
- Batch Script Resources
- Batch Script - Quick Guide
- Batch Script - Useful Resources
- Batch Script - Discussion
Batch Script - NET USER
This command can be used for the following −
- View the details of a particular user account.
- Add a user account.
- Delete a user’s account.
- Modify a user’s account.
Syntax
Net user [username [password | *] [options]] [/DOMAIN] username {password | *} /ADD [options] [/DOMAIN] username [/DELETE] [/DOMAIN]
Example
NET USER
The above command shows all the accounts defined on a system. Following is the output of the above command.
User accounts for \\WIN-50GP30FGO75 ------------------------------------------------------------------------------- Administrator atlbitbucket Guest The command completed successfully.
net user Guest
The above command shows the details of Guest account defined on a system. Following is the output of the above command.
Output
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
Advertisements