Introduction
net user is the classic Windows command for managing local user accounts from CMD.
For local admin permissions, you pair it with net localgroup administrators.
View local users
net user
To view one user:
net user student1
Create a local user
Create with a password:
net user student1 P@ssw0rd! /add
Create and require password change at first login:
net user student1 P@ssw0rd! /add
net user student1 /logonpasswordchg:yes
Create with full name and comment:
net user student1 P@ssw0rd! /add /fullname:"Student One" /comment:"Lab account"
Delete a local user
net user student1 /delete
Add user to local Administrators group
net localgroup administrators student1 /add
Verify membership:
net localgroup administrators
Remove user from local Administrators group
net localgroup administrators student1 /delete
Quick create + admin pattern
net user helpdesk1 Str0ngTemp! /add
net localgroup administrators helpdesk1 /add
Quick remove admin + delete pattern
net localgroup administrators helpdesk1 /delete
net user helpdesk1 /delete
Common useful switches
net user student1 /active:no
net user student1 /active:yes
net user student1 NewP@ssw0rd!
net user student1 /passwordchg:no
net user student1 /expires:never
Troubleshooting
| Message | What to check |
|---|---|
| System error 5 (Access is denied) | Run terminal as Administrator |
| The user name could not be found | Confirm spelling with net user |
| Access denied adding to administrators | Ensure elevation and local policy allows changes |
For full syntax:
net user /?
net localgroup /?