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 net commands identically.
  • For share and user commands on a domain, valid domain credentials.

Step-by-Step

  1. 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."
  2. See what the command can do. Type net and press Enter. Windows lists every available subcommand with a one-line description. To see the full syntax for one subcommand, type net help followed by the subcommand, for example net help user. The same information appears with net user /?.
  3. List and manage local user accounts. Type net user to list every account on the machine. To see details for one account, use net user AccountName. To create an account, run net user NewName Password /add, then promote it with net localgroup administrators NewName /add if it needs admin rights. To disable an account without deleting it, use net user AccountName /active:no. Deleting an account with net user AccountName /delete removes its profile data, so back up files first.
  4. Change or reset a password. Use net user AccountName NewPassword to 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 with cls.
  5. Work with groups. net localgroup lists local groups. net localgroup administrators shows who belongs to the Administrators group. Add a member with net localgroup administrators AccountName /add and remove one with /delete. On a domain-joined PC, net group works with domain groups instead.
  6. View and control shared folders. Type net share to list every share on the PC along with its path. Create one with net share ShareName=C:\Path, and remove it with net share ShareName /delete. Removing a share does not delete the folder or its files, only the network access to it.
  7. Map and disconnect network drives. net use lists current connections. Map a drive with net use Z: \\Server\Share, and add /persistent:yes to keep it after a restart. Disconnect with net use Z: /delete. If the share needs different credentials, add /user:Domain\Username to the mapping command.
  8. Check and start services. net start lists running services. Start one with net start ServiceName and stop it with net 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.
  9. Manage the workstation and server services. net config workstation shows the computer name, workgroup or domain, and logon domain. net config server shows sharing-related settings. These are read-only views unless you pass specific parameters, so they are safe to run for diagnostics.
  10. Send a message or check sessions. net session lists computers currently connected to your shares. net send no longer works on modern Windows because the Messenger service was removed; use msg instead 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 start needs 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. netuser is 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 send still works. It does not on current Windows versions.

Tips

  • Use net help before guessing syntax; it is faster than searching online.
  • Press the Up arrow to recall the previous command and edit it rather than retyping.
  • Run cls after 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, net commands 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.