<http://schema.org/articleBody>
"&amp;lt;h3&amp;gt;What is the Net Use Command?&amp;lt;/h3&amp;gt;&amp;lt;p&amp;gt;The net use &amp;lt;a href=&amp;quot;https://www.lifewire.com/what-is-a-command-2625828&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;1&amp;quot;&amp;gt;command&amp;lt;/a&amp;gt; is a &amp;lt;a href=&amp;quot;https://www.lifewire.com/list-of-command-prompt-commands-4092302&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;2&amp;quot;&amp;gt;Command Prompt command&amp;lt;/a&amp;gt; that&amp;amp;#39;s used to connect to, remove, and configure connections to shared resources, like mapped drives and network printers.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;The net use command is one of many &amp;lt;a href=&amp;quot;https://www.lifewire.com/net-command-2618094&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;3&amp;quot;&amp;gt;net commands&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;h3&amp;gt;Net Use Command Syntax&amp;lt;/h3&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;net use&amp;lt;/strong&amp;gt; [{&amp;lt;em&amp;gt;devicename&amp;lt;/em&amp;gt; | &amp;lt;strong&amp;gt;*&amp;lt;/strong&amp;gt;}] [&amp;lt;strong&amp;gt;\\\\&amp;lt;/strong&amp;gt;&amp;lt;em&amp;gt;computername&amp;lt;/em&amp;gt;&amp;lt;strong&amp;gt;\\&amp;lt;/strong&amp;gt;&amp;lt;em&amp;gt;sharename&amp;lt;/em&amp;gt;[&amp;lt;strong&amp;gt;\\&amp;lt;/strong&amp;gt;&amp;lt;em&amp;gt;volume&amp;lt;/em&amp;gt;] [{&amp;lt;em&amp;gt;password&amp;lt;/em&amp;gt; | &amp;lt;strong&amp;gt;*&amp;lt;/strong&amp;gt;}]] [&amp;lt;strong&amp;gt;/user:&amp;lt;/strong&amp;gt;[&amp;lt;em&amp;gt;domainname&amp;lt;/em&amp;gt;&amp;lt;strong&amp;gt;\\&amp;lt;/strong&amp;gt;]&amp;lt;em&amp;gt;username&amp;lt;/em&amp;gt;] [&amp;lt;strong&amp;gt;/user:&amp;lt;/strong&amp;gt;[&amp;lt;em&amp;gt;dotteddomainname&amp;lt;/em&amp;gt;&amp;lt;strong&amp;gt;\\&amp;lt;/strong&amp;gt;]&amp;lt;em&amp;gt;username&amp;lt;/em&amp;gt;] [&amp;lt;strong&amp;gt;/user:&amp;lt;/strong&amp;gt;[&amp;lt;em&amp;gt;username&amp;lt;/em&amp;gt;&amp;lt;strong&amp;gt;&amp;amp;#64;&amp;lt;/strong&amp;gt;&amp;lt;em&amp;gt;dotteddomainname&amp;lt;/em&amp;gt;] [&amp;lt;strong&amp;gt;/home&amp;lt;/strong&amp;gt; {&amp;lt;em&amp;gt;devicename&amp;lt;/em&amp;gt; | &amp;lt;strong&amp;gt;*&amp;lt;/strong&amp;gt;} [{&amp;lt;em&amp;gt;password&amp;lt;/em&amp;gt; | &amp;lt;strong&amp;gt;*&amp;lt;/strong&amp;gt;}]] [&amp;lt;strong&amp;gt;/persistent:&amp;lt;/strong&amp;gt;{&amp;lt;strong&amp;gt;yes&amp;lt;/strong&amp;gt; | &amp;lt;strong&amp;gt;no&amp;lt;/strong&amp;gt;}] [&amp;lt;strong&amp;gt;/smartcard&amp;lt;/strong&amp;gt;] [&amp;lt;strong&amp;gt;/savecred&amp;lt;/strong&amp;gt;] [&amp;lt;strong&amp;gt;/delete&amp;lt;/strong&amp;gt;] [&amp;lt;strong&amp;gt;/help&amp;lt;/strong&amp;gt;] [&amp;lt;strong&amp;gt;/?&amp;lt;/strong&amp;gt;]&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Tip:&amp;lt;/strong&amp;gt; See &amp;lt;a href=&amp;quot;https://www.lifewire.com/how-to-read-command-syntax-2618082&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;4&amp;quot;&amp;gt;How To Read Command Syntax&amp;lt;/a&amp;gt; if you&amp;amp;#39;re not sure how to interpret the net use command &amp;lt;a href=&amp;quot;https://www.lifewire.com/what-is-syntax-2626014&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;5&amp;quot;&amp;gt;syntax&amp;lt;/a&amp;gt; shown above.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Execute the net use command alone to show detailed information about currently mapped drives and devices.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;devicename&amp;lt;/em&amp;gt; &amp;amp;#61; Use this option to specify the drive letter or printer port you want to map the network resource to. For a shared folder on the network, specify a drive letter from &amp;lt;em&amp;gt;D:&amp;lt;/em&amp;gt; through &amp;lt;em&amp;gt;Z:&amp;lt;/em&amp;gt; and for a shared printer, &amp;lt;em&amp;gt;LPT1:&amp;lt;/em&amp;gt; through &amp;lt;em&amp;gt;LPT3:&amp;lt;/em&amp;gt;. Use &amp;lt;strong&amp;gt;*&amp;lt;/strong&amp;gt; instead of specifying &amp;lt;em&amp;gt;devicename&amp;lt;/em&amp;gt; to automatically assign the next available drive letter, starting with &amp;lt;em&amp;gt;Z:&amp;lt;/em&amp;gt; and moving backwards, for a mapped drive.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;\\\\&amp;lt;/strong&amp;gt;&amp;lt;em&amp;gt;computername&amp;lt;/em&amp;gt;&amp;lt;strong&amp;gt;\\&amp;lt;/strong&amp;gt;&amp;lt;em&amp;gt;sharename&amp;lt;/em&amp;gt; &amp;amp;#61; This specifies the name of the computer, &amp;lt;em&amp;gt;computername&amp;lt;/em&amp;gt;, and the shared resource, &amp;lt;em&amp;gt;sharename&amp;lt;/em&amp;gt;, like a shared folder on a or shared printer connected to &amp;lt;em&amp;gt;computername&amp;lt;/em&amp;gt;. If there are spaces anywhere here, be sure to put the entire path, slashes included, in quotes.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;volume&amp;lt;/em&amp;gt; &amp;amp;#61; Use this option to specify the &amp;lt;em&amp;gt;volume&amp;lt;/em&amp;gt; when connecting to a NetWare server.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;password&amp;lt;/em&amp;gt; &amp;amp;#61; This is the password needed to access the shared resource on &amp;lt;em&amp;gt;computername&amp;lt;/em&amp;gt;. You can choose enter the password during the execution of the net use command by typing * instead of the actual password.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;/user&amp;lt;/strong&amp;gt; &amp;amp;#61; Use this net command option to specify a &amp;lt;em&amp;gt;username&amp;lt;/em&amp;gt; to connect to the resource with. If you don&amp;amp;#39;t use &amp;lt;strong&amp;gt;/user&amp;lt;/strong&amp;gt;, net use will attempt to connect to the network share or printer with your current username.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;domainname&amp;lt;/em&amp;gt; &amp;amp;#61; Specify a different domain than the one you&amp;amp;#39;re on, assuming you&amp;amp;#39;re on one, with this option. Skip &amp;lt;em&amp;gt;domainname&amp;lt;/em&amp;gt; if you&amp;amp;#39;re not on a domain or you want net use to use the one you&amp;amp;#39;re on already.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;username&amp;lt;/em&amp;gt; &amp;amp;#61; Use this option with &amp;lt;strong&amp;gt;/user&amp;lt;/strong&amp;gt; to specify the username to use to connect to the shared resource.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;dotteddomainname&amp;lt;/em&amp;gt; &amp;amp;#61; This option specifies the fully qualified domain name where &amp;lt;em&amp;gt;username&amp;lt;/em&amp;gt; exists.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;/home&amp;lt;/strong&amp;gt; &amp;amp;#61; This net use command option maps the current user&amp;amp;#39;s home directory to either the &amp;lt;em&amp;gt;devicename&amp;lt;/em&amp;gt; drive letter or the next available drive letter with &amp;lt;strong&amp;gt;*&amp;lt;/strong&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;/persistent:&amp;lt;/strong&amp;gt;{&amp;lt;strong&amp;gt;yes&amp;lt;/strong&amp;gt; | &amp;lt;strong&amp;gt;no&amp;lt;/strong&amp;gt;} &amp;amp;#61; Use this option to control the persistence of connections created with the net use command. Choose &amp;lt;strong&amp;gt;yes&amp;lt;/strong&amp;gt; to automatically restore created connections at the next logon or choose &amp;lt;strong&amp;gt;no&amp;lt;/strong&amp;gt; to limit the life of this connection to this session. You can shorten this switch to &amp;lt;strong&amp;gt;/p&amp;lt;/strong&amp;gt; if you like.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;/smartcard&amp;lt;/strong&amp;gt; &amp;amp;#61; This switch tells the net use command to use the credentials present on the available smart card.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;/savecred&amp;lt;/strong&amp;gt; &amp;amp;#61; This option stores the &amp;lt;em&amp;gt;password&amp;lt;/em&amp;gt; and &amp;lt;strong&amp;gt;user&amp;lt;/strong&amp;gt; information for use next time you connect in this session or in all future sessions when used with &amp;lt;strong&amp;gt;/persistent:yes&amp;lt;/strong&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;/delete&amp;lt;/strong&amp;gt; &amp;amp;#61; This net use command is used to cancel a network connection. Use &amp;lt;strong&amp;gt;/delete&amp;lt;/strong&amp;gt; with &amp;lt;em&amp;gt;devicename&amp;lt;/em&amp;gt; to remove a specified connection or with &amp;lt;strong&amp;gt;*&amp;lt;/strong&amp;gt; to remove all mapped drives and devices. This option can be shortened to &amp;lt;strong&amp;gt;/d&amp;lt;/strong&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;/help&amp;lt;/strong&amp;gt; &amp;amp;#61; Use this option, or the shortened &amp;lt;strong&amp;gt;/h&amp;lt;/strong&amp;gt;, to display detailed help information for the net use command. Using this switch is the same as using the net help command with net use: &amp;lt;strong&amp;gt;net help use&amp;lt;/strong&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;/?&amp;lt;/strong&amp;gt; &amp;amp;#61; The standard &amp;lt;a href=&amp;quot;https://www.lifewire.com/help-switch-2625896&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;6&amp;quot;&amp;gt;help switch&amp;lt;/a&amp;gt; also works with the net use command but the only displays the command syntax, not any detailed information about the command&amp;amp;#39;s options.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Tip:&amp;lt;/strong&amp;gt; You can save the output of the net use command to a file using a &amp;lt;a href=&amp;quot;https://www.lifewire.com/redirection-operator-2625979&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;7&amp;quot;&amp;gt;redirection operator&amp;lt;/a&amp;gt;. See &amp;lt;a href=&amp;quot;https://www.lifewire.com/how-to-redirect-command-output-to-a-file-2618084&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;8&amp;quot;&amp;gt;How To Redirect Command Output to a File&amp;lt;/a&amp;gt; for help doing that, or see &amp;lt;a href=&amp;quot;https://www.lifewire.com/command-prompt-tricks-and-hacks-2618104&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;9&amp;quot;&amp;gt;Command Prompt Tricks&amp;lt;/a&amp;gt; for this and more tips.&amp;lt;/p&amp;gt;&amp;lt;h3&amp;gt;Net Use Command Examples&amp;lt;/h3&amp;gt;&amp;lt;pre&amp;gt;\n&amp;lt;strong&amp;gt;net use * &amp;amp;#34;\\\\server\\my media&amp;amp;#34; /persistent:no&amp;lt;/strong&amp;gt;\n&amp;lt;/pre&amp;gt;&amp;lt;p&amp;gt;In this example, I used the net use command to connect to the &amp;lt;em&amp;gt;my media&amp;lt;/em&amp;gt; shared folder on a computer named &amp;lt;em&amp;gt;server&amp;lt;/em&amp;gt;. The &amp;lt;em&amp;gt;my media&amp;lt;/em&amp;gt; folder will be mapped to my highest free drive letter [&amp;lt;strong&amp;gt;*&amp;lt;/strong&amp;gt;], which for me happens to be y:, but I don&amp;amp;#39;t want to continue mapping this drive every time I log on to my computer [&amp;lt;strong&amp;gt;/persistent:no&amp;lt;/strong&amp;gt;].&amp;lt;/p&amp;gt;&amp;lt;pre&amp;gt;\n&amp;lt;strong&amp;gt;net use e: \\\\usrsvr002\\smithmark Ue345Ii /user:pdc01\\msmith2 /savecred /p:yes&amp;lt;/strong&amp;gt;\n&amp;lt;/pre&amp;gt;&amp;lt;p&amp;gt;Here&amp;amp;#39;s a slightly more complicated example that you might see in a business setting.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;In this net use example, I want to map my &amp;lt;em&amp;gt;e:&amp;lt;/em&amp;gt; drive to the &amp;lt;em&amp;gt;smithmark&amp;lt;/em&amp;gt; shared folder on &amp;lt;em&amp;gt;usrsvr002&amp;lt;/em&amp;gt;. I want to connect as another user account I have [&amp;lt;strong&amp;gt;/user&amp;lt;/strong&amp;gt;] by the name of &amp;lt;em&amp;gt;msmith2&amp;lt;/em&amp;gt; that&amp;amp;#39;s stored on the &amp;lt;em&amp;gt;pdc01&amp;lt;/em&amp;gt; domain with a password of &amp;lt;em&amp;gt;Ue345Ii&amp;lt;/em&amp;gt;. I don&amp;amp;#39;t want to map this drive manually every time I start my computer [&amp;lt;strong&amp;gt;/p:yes&amp;lt;/strong&amp;gt;] nor do I want to enter my username and password each time [&amp;lt;strong&amp;gt;/savecred&amp;lt;/strong&amp;gt;].&amp;lt;/p&amp;gt;&amp;lt;pre&amp;gt;\n&amp;lt;strong&amp;gt;net use p: /delete&amp;lt;/strong&amp;gt;\n&amp;lt;/pre&amp;gt;&amp;lt;p&amp;gt;I suppose an appropriate final example of net use would be the removal [&amp;lt;strong&amp;gt;/delete&amp;lt;/strong&amp;gt;] of a currently mapped drive, in this case &amp;lt;em&amp;gt;p:&amp;lt;/em&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;h3&amp;gt;Net Use Command Availability&amp;lt;/h3&amp;gt;&amp;lt;p&amp;gt;The net use command is available from within the &amp;lt;a href=&amp;quot;https://www.lifewire.com/command-prompt-2625840&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;10&amp;quot;&amp;gt;Command Prompt&amp;lt;/a&amp;gt; in &amp;lt;a href=&amp;quot;https://www.lifewire.com/windows-8-2626235&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;11&amp;quot;&amp;gt;Windows 8&amp;lt;/a&amp;gt;, &amp;lt;a href=&amp;quot;https://www.lifewire.com/windows-7-2626265&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;12&amp;quot;&amp;gt;Windows 7&amp;lt;/a&amp;gt;, &amp;lt;a href=&amp;quot;https://www.lifewire.com/windows-vista-2626311&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;13&amp;quot;&amp;gt;Windows Vista&amp;lt;/a&amp;gt;, and &amp;lt;a href=&amp;quot;https://www.lifewire.com/windows-xp-2626354&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;14&amp;quot;&amp;gt;Windows XP&amp;lt;/a&amp;gt;, as well as in older versions of Windows and in Windows Server &amp;lt;a href=&amp;quot;https://www.lifewire.com/operating-systems-2625912&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;15&amp;quot;&amp;gt;operating systems&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;a href=&amp;quot;https://www.lifewire.com/recovery-console-2625991&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;16&amp;quot;&amp;gt;Recovery Console&amp;lt;/a&amp;gt;, the offline repair utility in Windows XP, also includes the net use command but it&amp;amp;#39;s not possible to use it within the tool.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; The availability of certain net use command switches and other net use command syntax may differ from operating system to operating system.&amp;lt;/p&amp;gt;&amp;lt;h3&amp;gt;Net Use Related Commands&amp;lt;/h3&amp;gt;&amp;lt;p&amp;gt;The net use command is a subset of the &amp;lt;a href=&amp;quot;https://www.lifewire.com/net-command-2618094&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;17&amp;quot;&amp;gt;net command&amp;lt;/a&amp;gt; and so is similar to its sister commands like &amp;lt;a href=&amp;quot;https://www.lifewire.com/net-send-2618095&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;18&amp;quot;&amp;gt;net send&amp;lt;/a&amp;gt;, net time, &amp;lt;a href=&amp;quot;https://www.lifewire.com/net-user-command-2618097&amp;quot; data-component=&amp;quot;link&amp;quot; data-source=&amp;quot;inlineLink&amp;quot; data-type=&amp;quot;internalLink&amp;quot; data-ordinal=&amp;quot;19&amp;quot;&amp;gt;net user&amp;lt;/a&amp;gt;, net view, etc.&amp;lt;/p&amp;gt;"^^<http://www.w3.org/2001/XMLSchema#string>
<https://www.lifewire.com/net-use-command-2618096>