How to Use net user in Windows (Create/Delete Users and Local Admin)

Windows Scripting | Published 2026-04-14 | By NetCollege Team

Summary: Practical net user command guide for creating and deleting local users, setting passwords, and adding or removing users from local Administrators.

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

MessageWhat to check
System error 5 (Access is denied)Run terminal as Administrator
The user name could not be foundConfirm spelling with net user
Access denied adding to administratorsEnsure elevation and local policy allows changes

For full syntax:

net user /?
net localgroup /?

Frequently asked questions

Do I need to run these commands as Administrator?

Yes. Creating or deleting local users and changing local Administrators group membership requires an elevated CMD or PowerShell session.

What is the difference between net user and net localgroup?

net user manages user accounts, while net localgroup manages membership of local groups like Administrators.

Can I force a user to change password at first sign-in?

Yes. Use net user username * /logonpasswordchg:yes after creating the account.

← Back to category