Windows NET Commands Every Sysadmin Should Know
Although PowerShell has become the preferred management tool for modern Windows administration, the old net commands remain incredibly useful. They’re installed on every Windows server and workstation, work over remote shells, and are often quicker than opening a GUI.
List Local Users
net user
Displays all local accounts on the system.
View details of a specific account:
net user username
Create a Local User
net user username Password123! /add
Creates a new local account.
Reset a Password
Set a password:
net user username NewPassword123!
Prompt securely for a password:
net user username *
This is generally the safer method as the password is not displayed on screen.
Disable or Enable an Account
Disable login access:
net user username /active:no
Re-enable login access:
net user username /active:yes
Force Password Change at Next Login
net user username /logonpasswordchg:yes
Remove the requirement:
net user username /logonpasswordchg:no
Prevent Password Changes
Prevent users changing their own password:
net user username /passwordchg:no
Allow changes again:
net user username /passwordchg:yes
Add a User to Local Administrators
net localgroup Administrators username /add
Remove administrator rights:
net localgroup Administrators username /delete
View current local administrators:
net localgroup Administrators
Add Remote Desktop Access
net localgroup "Remote Desktop Users" username /add
Commonly used when granting RDP access to a workstation or server.
Check Password Policy
net accounts
Displays:
- Minimum password length
- Maximum password age
- Password history
- Lockout threshold
- Lockout duration
Set password expiry to 90 days:
net accounts /maxpwage:90
Disable expiry for all local accounts:
net accounts /maxpwage:unlimited
Password Never Expires (Single User)
This cannot be configured using net user.
Use PowerShell instead:
Set-LocalUser -Name "username" -PasswordNeverExpires $true
View Existing Shares
net share
Create a share:
net share Data=C:\Data
Delete a share:
net share Data /delete
Start and Stop Services
Start a service:
net start spooler
Stop a service:
net stop spooler
Check Administrative Rights
net session
If the command returns:
Access is denied.
the command prompt is not running with administrative privileges.
My Most Used NET Commands
net user net user username net user username * net localgroup Administrators net accounts net share net start net stop
Despite their age, these commands remain some of the fastest ways to manage Windows systems, particularly when working through Command Prompt, Server Core installations, Hyper-V hosts, recovery environments, or remote support sessions.
![]()
