Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Windows cmd.exe Command-Prompt ► ««« »»»

Map network drives via the command prompt under Windows!


Connecting or disconnecting network drives via the command prompt under Windows 11, 10, ... or MS Server without mouse clicks is a very practical option!



1.) ... Mapping a network drive or a folder! 
2.) ... make network paths permanently available as a drive!
3.) ... Delete assigned drives individually or all!
4.) ... Why are the network paths as drive letters? 




Why not if it is possible to map a network drive to a shared folder via the Windows graphical user interface, everyone knows it because it is easy. However, if you already know the network path for the shared folder, you can map and unmount drives faster using the command prompt!


1.) Mapping a network drive or a folder! 

The connecting! In this example,  drive M: is assigned to  the path "\\fritz-nas\nas\My documents"


net use M: "\\fritz-nas\nas\My documents"


Connecting with password protection 


net use s : \\fritz-nas\nas  /user:The_User The_Passwort




(Image-1) Map network drives via the command prompt under Windows!
Map network drives via the command prompt under Windows!

-
▲ Back to the top ▲



2.) Make network paths permanently available as a drive!

The permanent connection can be achieved:  /persistent:Yes ! In the example here,  drive M: is permanently assigned to the path "\\fritz-nas\nas\My documents" If not specified, it is like /persistent:No  By default, mapped drives are not persistent. If we were to map drives using the commands mentioned so far, the mapped drives would disappear when you restart your computer.



net use M: "\\ fritz-nas\nas\My documents"  /persistent:Yes



3.) Delete assigned drives, individually or all!

If you ever need to delete a mapped network drive, all you have to do is specify the drive letter and add the /delete parameter. For example, the following command would delete the drive mapping to "\\fritz-nas\nas\My Documents" , to which we previously assigned drive M



net use M: /delete


You can use the asterisk * wildcard in case you ever want to delete / unlock all of your mapped drives at once. Of course, only the release or drive letter assignment is canceled! (... see Image-2 Point 1 to 4)



net use * /delete




(Image-2) Unlink or remove network drives on all MS Windows OS
Unlink or remove network drives on all MS Windows OS

-
▲ Back to the top ▲



4.) Why the network paths as drive letters? 

Mapping a drive to a network share assigns a drive letter to that share, making it easier to work with. We'll use the net use command in the command prompt to map a network drive for this tutorial. You can use the same command in PowerShell as well if you prefer.

See also ► How can I map a network drive under Windows 11?







FAQ 123: Updated on: 5 November 2021 20:21 Windows
Windows-Console

Deactivate, activate, list network adapters via command prompt!


Deactivating, activating and listing the network adapters via command prompt or Powershell is quite easy to do under Windows 11, 10, and MS Server Everyone
Windows-Console

Optimize drives about the command prompt on MS Windows OS!


Yes, and its easy to optimize drives on Windows 11, 10, from the command prompt using the defrag command Everyone probably knows the drive optimization
Windows-Console

Export a list of running processes as a text file with cmd.exe!


Its easy to export a list of running processes as a text file using the command prompts cmd.exe on Windows 11, 10, etc 1. exporting the running
Windows-Console

Generate file hash via command prompt!


Sometimes you need the SHA value of a file, in the command prompt you can create a file hash under Windows 11, 10, Hash algorithms: MD2 MD4 MD5 SHA1
Windows-Console

Adjust lock screen duration from command prompt!


Adjust lock screen duration from command prompt is a little-known option on Windows 11, 10, and MS Server OS   Content: 1. The lock screen display
Windows-Console

Directly open command prompt in each folder!


Here is the solution to open the command prompt directly in each folder without much effort on all Windows 11, 10, and MS Server operating systems  
Windows-Console

Find out programs that start with Windows via the command prompt?


You can find out programs that start with Windows via the classic command prompt on all MS Windows OS Everyone probably knows the practical ►  Autostart

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: windows, console, network, drives, command, prompt, connecting, disconnecting, mapping, option, Questions, Answers, Software




    

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + Find.Same.Images.OK
  + 3D.Benchmark.OK
  + PhotoResizerOK
  + Office.Files.Images
  + Film.Strip.Explorer
  + WinScan2PDF
  + DontSleep
  + ExperienceIndexOK
  + QuickTextPaste
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Windows 2021 | Windows 10 | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2023 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu
0.077


► Full duplex connections, transmission rate and speed? ◄

► I don't always have the same CPU frequency, why? ◄

► What is a Rubik's Cube? ◄

This website uses cookies to ensure you get the best experience on our website more Infos & Privacy Policy
....