The net Command Prompt command manages almost any aspect of a network and its settings, including network shares, network print jobs, and network users.
Net Command Availability
The net command is available from within the Command Prompt in all Windows operating systems including Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP.
Net Command Syntax
The command takes the following general form:
The availability of certain net command switches and other net command syntax may differ from operating system to operating system.
net [accounts | computer | config | continue | file | group | help | helpmsg | localgroup | name | pause | print | send | session | share | start | statistics | stop | time | use | user | view]
Learn how to read command syntax if you’re not sure how to interpret the net command syntax shown above or described below.
Net Command Examples
net view
This is one of the simplest net commands that lists all the networked devices.
Save to a file whatever a net command shows on screen using a redirection operator with the command. Learn how to redirect command output to a file or see our list of command prompt tricks for more tips.
Only in Windows NT and Windows 2000 was there a difference in the net command and the net1 command. The net1 command was made available in these two operating systems as a temporary fix for a Y2K problem that affected the net command.
net share Downloads=Z:\Downloads /GRANT:everyone,FULL
In the above example, I’m sharing the Z:\Downloads folder with everyone on the network and giving all of them full read/write access. You could modify this one by replacing FULL with READ or CHANGE for those rights only, as well as replace everyone with a specific username to give share access to just that one user account.
net accounts /MAXPWAGE:180
This example of the net accounts command forces a user’s password to expire after 180 days. This number can be anywhere from 1 to 49,710, or UNLIMITED can be used so that the password never expires. Default is 90 days.
net stop “print spooler”
The above net command example is how you’d stop the Print Spooler service from the command line. Services can also be started, stopped, and restarted via the Services graphical tool in Windows (services.msc), but using the net stop command lets you control them from places like Command Prompt and BAT files.
net start
Executing the net start command without any options following it (e.g., net start “print spooler”) is useful if you want to see a list of currently running services. This list can be helpful when managing services because you don’t have to leave the command line to see which services are running.
Related Commands
The net commands are network-related commands and so may often be used for troubleshooting or management alongside commands like ping, tracert, ipconfig, netstat, nslookup, and others.
Get the Latest Tech News Delivered Every Day
Net Send Command
Vol Command Examples and Options
Copy Command
More Command
How to Use the Netstat Command
Xcopy Command
Msg Command (Examples, Switches, and More)
Rename Command
Sfc Command (System File Checker)
How to Use the Netstat Command on Mac
How to Use the Net Use Command in Windows
How to Use the Ping Command in Windows
How to Redirect Command Output to a File
How to Reset a Windows Vista Password
How to Use the Tracert Command in Windows
How to Use the ‘At’ Command in Windows
Facebook
Twitter
Hit Refresh on Your Tech News
About Us
Privacy Policy
Editorial Guidelines
Terms of Use
Careers
Advertise
Contact
EU Privacy
NEWS
HOW TO
FEATURES
ABOUT US