The net command is a built-in Windows command-line tool that lets you manage network settings, user accounts, shared folders, services and connections from a single prompt. It works on every supported version of Windows, needs no installation, and requires an Administrator-level Command Prompt or PowerShell window for most of its useful subcommands. The quickest way to use it is to open Command Prompt as administrator, type net followed by a subcommand and its options (for example net user), and press Enter.
This guide walks through the most practical net subcommands, how to run them safely, and what to do when a command refuses to work. Menu labels and command syntax can differ slightly between Windows versions, editions and regions, so if an option is not recognised, check the built-in help for that subcommand first.
What You'll Need
- A Windows PC running Windows 10 or Windows 11 (the commands below also exist on Windows 8.1 and 7, though some options differ).
- An account with Administrator rights for anything that changes users, shares, services or network configuration.
- Access to Command Prompt or PowerShell. Both accept
netcommands identically. - For share and user commands on a domain, valid domain credentials.
Step-by-Step
- Open an elevated Command Prompt. Press the Windows key, type cmd, right-click Command Prompt and choose Run as administrator. On Windows 11 you can also right-click the Start button and pick Terminal (Admin). Without elevation, read-only commands work but anything that changes settings will return "Access is denied."
- See what the command can do. Type
netand press Enter. Windows lists every available subcommand with a one-line description. To see the full syntax for one subcommand, typenet helpfollowed by the subcommand, for examplenet help user. The same information appears withnet user /?. - List and manage local user accounts. Type
net userto list every account on the machine. To see details for one account, usenet user AccountName. To create an account, runnet user NewName Password /add, then promote it withnet localgroup administrators NewName /addif it needs admin rights. To disable an account without deleting it, usenet user AccountName /active:no. Deleting an account withnet user AccountName /deleteremoves its profile data, so back up files first. - Change or reset a password. Use
net user AccountName NewPasswordto set a password directly. This is the standard recovery route when you are already signed in as an administrator and the other account is locked out. The password is typed in plain text on screen, so clear the window afterwards withcls. - Work with groups.
net localgrouplists local groups.net localgroup administratorsshows who belongs to the Administrators group. Add a member withnet localgroup administrators AccountName /addand remove one with/delete. On a domain-joined PC,net groupworks with domain groups instead. - View and control shared folders. Type
net shareto list every share on the PC along with its path. Create one withnet share ShareName=C:\Path, and remove it withnet share ShareName /delete. Removing a share does not delete the folder or its files, only the network access to it. - Map and disconnect network drives.
net uselists current connections. Map a drive withnet use Z: \\Server\Share, and add/persistent:yesto keep it after a restart. Disconnect withnet use Z: /delete. If the share needs different credentials, add/user:Domain\Usernameto the mapping command. - Check and start services.
net startlists running services. Start one withnet start ServiceNameand stop it withnet stop ServiceName. Service names are the short internal names, not the display names shown in the Services app, so confirm the exact name before typing it. - Manage the workstation and server services.
net config workstationshows the computer name, workgroup or domain, and logon domain.net config servershows sharing-related settings. These are read-only views unless you pass specific parameters, so they are safe to run for diagnostics. - Send a message or check sessions.
net sessionlists computers currently connected to your shares.net sendno longer works on modern Windows because the Messenger service was removed; usemsginstead if you need to send a message to another session on the same PC.
Common Mistakes
- Running without elevation. Most failures trace back to a normal Command Prompt. Reopen as administrator before trying again.
- Confusing display names with service names.
net startneeds the short service name. Guessing produces "The service name is invalid." - Deleting accounts or shares to "test." Account deletion removes the profile; share deletion cuts off other users mid-session. Disable or rename first where possible.
- Forgetting the space in
net user.netuseris not a command and returns "not recognized." - Typing passwords on a shared screen. The password appears in plain text and stays in the command history.
- Assuming
net sendstill works. It does not on current Windows versions.
Tips
- Use
net helpbefore guessing syntax; it is faster than searching online. - Press the Up arrow to recall the previous command and edit it rather than retyping.
- Run
clsafter entering a password so it does not remain visible. - Quote paths that contain spaces, for example
net share Docs="C:\My Shared Folder". - For scripting,
netcommands return exit codes you can test, which makes them useful in batch files.
Troubleshooting
"Access is denied." The window is not elevated, or your account lacks the right permission. Reopen as administrator and check your group membership with net localgroup administrators.
"The syntax of this command is incorrect." A parameter is misspelled or missing. Run net help Subcommand and compare your line character by character, paying attention to spaces and slashes.
"System error 5 has occurred." This is another permission error, usually when mapping a drive or stopping a service. Confirm you are elevated and that the account has access to the remote share.
"System error 53 has occurred" or 67. The network path was not found. Check the server name, that file and printer sharing is enabled, and that the two machines can reach each other.
"The service name is invalid." Open the Services app, find the service, and note the short name in its properties rather than the display name.
Command not recognised at all. Confirm you are in Command Prompt or PowerShell and not in a different shell. If the whole system seems affected, restart the PC and try again.
If that did not work, sign out and back in, then retry. As a last resort, restart the PC. Avoid resetting the network stack or clearing app data unless you understand what will be lost, and never run commands from untrusted sources.
Frequently Asked Questions
Does the net command work in PowerShell?
Yes. PowerShell accepts net commands exactly as Command Prompt does, provided the window is elevated for administrative actions.
Is net available on Windows Home editions?
Yes. The command is part of Windows itself and is present on Home and Pro alike. Some subcommands behave differently on domain-joined machines, which Home cannot join.
Can I undo a net command?
Most changes can be reversed: recreate a deleted user, re-add a removed group member, or re-share a folder. Deleted user profiles and their files are not recoverable through net, so back up first.
Why does net user show accounts I did not create?
Windows creates built-in accounts such as Administrator and Guest, plus system accounts used by services. These are normal; leave them alone unless you know exactly what they do.
What replaced net send?
The Messenger service was removed from modern Windows. Use msg for messages to sessions on the same computer.
Do I need to be online to use net?
No. Local commands such as net user and net share work offline. Commands that reach a server, such as net use against a remote share, need a working network connection.