The net command is used to update or fix a network or view its settings.

Availability

Net is an external command that is available for the following Microsoft operating systems as net.exe.

  • Availability

  • Net syntax

  • Net examples

  • Windows 95

  • Windows 98

  • Windows NT

  • Windows ME

  • Windows 2000

  • Windows XP

  • Windows Vista

  • Windows 7

  • Windows 8

  • Windows 10

  • Windows 11

Net syntax

Windows Vista and later syntax

net [ accounts | computer | config | continue | file | group | help | helpmsg | localgroup | pause | session | share | start | statistics | stop | time | use | user | view ]

Windows XP syntax

NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP | HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION | SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]

  • Windows Vista and later syntax.
  • Windows XP syntax.

Windows 2000 syntax

NET [ CONFIG | DIAG | HELP | INIT | LOGOFF | LOGON | PASSWORD | PRINT | SEND | SHARE | START | STOP | TIME | USE | VER | VIEW ]

Net examples

net use z: \computer\folder

Map the Z: drive to the network path //computer/folder.

To start the workgroup redirector you selected during setup, type NET START without options. In general, you don’t need to use any of the options.

To stop the workgroup redirector, type NET STOP without options. This command breaks all your connections to shared resources and removes the NET commands from your computer’s memory.

net send mrhope “There is hope!”

Send a text message to the computer with a hostname of mrhope the message There is hope!.

net send * “Hello everyone!”

The command above would send “Hello everyone!” to all users in your current domain.

This command only works in Windows versions that support it.

Today’s computers disable the messenger service. If this service is disabled, you cannot send or receive net send messages. If you need to use this service, follow the instructions on this page and choose to enable the service instead of disabling it.

New versions of Windows no longer support the net send command. Instead, use the msg command.

net config workstation

Display additional information about the network such as the computer’s name, workgroup, logon domain, DNS, and other useful information.

Used this command with caution. On a school or corporate network, any computer with the Messenger service enabled could receive the message.

net view \hope

To view the available computers and their shared resources, you may use either of the commands below. The first example displays available computers. The last command would display the shared resources on the hope computer.

net localgroup

Display all groups currently setup on the computer.

net share

Display all network shares on your computer.

net share hope=c:\hope\files

Create a share called “hope” for the “c:\hope\files” directory.

  • How to prevent Messenger pop-ups.
  • See the Windows 10 msg command for help with sending messages to other computers using Windows 10.