It’s one of many net commands like net send, net time, net user, net view, etc.
Net Use Command Availability
This command is available from within the Command Prompt in Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP, and in older versions of Windows and in Windows Server operating systems. Recovery Console, the offline repair utility in Windows XP, also includes the net use command, but it’s not possible to use it within the tool.
Net Use Command Syntax
This command uses the following general syntax: net use [{devicename | *}] [\computername\sharename[\volume] [{password | *}]] [/user:[domainname]username] [/user:[dotteddomainname]username] [/user:[username@dotteddomainname] [/home {devicename | *} [{password | *}]] [/persistent:{yes | no}] [/smartcard] [/savecred] [/delete] [/help] [/?]
Temporary Mapped Drive
In this example, we used the net use command to connect to the my media shared folder on a computer named server. The my media folder will be mapped to the highest available drive letter [*], which in our example happens to be y:, but we don’t want to continue mapping this drive every time we log onto the computer [/persistent:no].
Permanent Mapped Drive
The above is a slightly more complicated example that you might see in a business setting. In this net use example, we want to map our e: drive to the smithmark shared folder on usrsvr002. We want to connect as another user account we have [/user] by the name of msmith2 that’s stored on the pdc01 domain with a password of Ue345Ii. We don’t want to map this drive manually every time we start the computer [/p:yes], nor do we want to enter the username and password each time [/savecred].
List All Shared Resources
In this simple example of the net use command, we get a list of all the shared resources currently in use under the user account that’s currently logged in. In our example, the result in Command Prompt shows “Z: \server\shared folder" since z: is the drive letter that’s connecting to shared folder on server. The message “There are no entries in this list.” will show if there aren’t any connections currently set up.
Unmap a Drive
An appropriate final example of net use is the removal [/delete] of a currently mapped drive, in this case, p:.