How-To Map a Network Drive using Windows 7, Vista or Windows Server 2008

Windows Network Icon ::

Mapping a Network Drive using Windows 7, Windows Vista or is easy right?  Well, based on the number of emails I get asking me how to do it, it’s not as easy as Microsoft probably intended.  But it’s simple once I show you where it’s hidden, so as a bonus, I’ll also show you how to do it from the CMD line.


First, here’s the standard method using Windows Explorer.

How-To Map a Network Drive in Windows 7, Windows Vista and Windows Server 2008 using Windows Explorer

1. Click Windows Start Button, Computer

Open the Computer Area in Windows Explorer - Windows 7, Vista and Windows Server 2008


2. Click Map Network Drive; I know, it was hidden :)

Map a network drive in Windows 7, Vista and Server 2008 from Windows Explorer


3. Select the Drive Letter (I choose Z in my example), Type or Browse to the Server Share, Check Reconnect at Logon Box if you want the Mapping to be persistent (remain after a reboot).  Click Finished when finished.

Map a network drive in Windows Vista and Server 2008 from Windows Explorer

ALL DONE!  I told you it was easy!

Ok, now let’s review the how-to from the CMD line interface.


How-To Map a Network Drive in Windows 7, Vista and Windows Server 2008 using the CMD Line

1. Click Windows Start Button and Type CMD then Press Enter Key

Open the CMD or Command Line interface in Windows


2.   Type net use z: /persistent:yes \servernameshare and Press Enter

Map a network drive from the command line

From the example above, feel free to use the drive letter of your choice.  Use an * to choose the next available drive letter currently not mapped to anything.

You can also exclude the /persistent switch if you don’t want the mapping to be permanent (persistent after a reboot).  Additionally, you can use the IP address of the server/workstation if you want.

One other note, the above command string also assumes you have access to the server share your trying to access.  If you need to connect using a different account, use the following command:

net use z: /persistent:yes \\servername\share /u:domainaccount password

Confused?  More questions?  LOVE  Leave a comment or post your question in the .



  1. shockersh

    great tip. I found the windows explorer on my own but the CMD line section was nice. Didn’t know about the persistent switch!

  2. tomb

    Thanks again. Prior to reading this, I had resorted to mapping my drives from the command shell. Thanks again!

    On a seperate thread….. how did you turn your text yellow in the command shell window?

  3. CRAIG

    Thanks for this post. I have an XP box that I am trying to Map a drive to Windows 2008 server that I need to automatically connect each time the XP user logs on. While I have been able to establish a mapped drive to the domain from the XP box using the standard XP interface to set it up, each time I log off and then back on, the drive is not available. Yes the domain name and user name is filled in, but the drive will not connect until I provide the password. This is no doubt a Windows 2008 security setting issue.

    So how do I get past the password issue on my mapped drive on an XP box that is connecting to Windows 2008 Server?


  4. MrGroove

    @Tomb – Hi Tom. Changing the colors of the CMD window is actually really simple. Rather than go into the Step-by-step here, I’ll write up a quick HOW-TO and link to it from here.


  5. MrGroove

    @Craig – If you want a persistent drive mapping, it actually doesn’t have anything to do with the Windows Server. It all depends on how you map the drive. From the Windows GUI, be sure you check the box (Reconnect at Logon).
    Also, alternatively if you map the drive from a CMD window (Command Prompt) you can use persistent:yes command as shown above in the Article.

    net use z: /persistent:yes \\servername\share

    Hope that fixes it for you.

  6. craig

    Thanks for the response. I had previously done as you suggested using the (Reconnect at Logon). However when I open the control panel and attempt to look at the mapped drive, the windows logon screen comes back. This screen shows the previously defined domain and user name, but requires a pw. If I put the pw in for the displayed domain and user name, the share reappears.

    The thing I probably forgot to indicate is the XP IS LOGGING ON LOCALLY. I know this is probably a “big forgot to tell you” this item.

  7. MrGroove

    Ah. Well, I actually don’t have an XP box that’s not domain attached so I cant test this but, what I would try next is:

    Check the box, “Reconnect at logon”. Then, under that box Click the Text: “Connect using a different User name”. Enter in the credentials and PW and hopefully that does the trick.

    If not, then try this LAST DITCH EFFORT. Go into Control panel, User Accounts, Advanced Tab, Manage Passwords. Click Add and enter in the Server and User & PW. This should use these credentials anytime you connect to resources from that server.
    Let me know

  8. craig

    MrGroove: Unfortunately, I had already tried what you suggested in the first part, namely “Reconnect at Logon” and the Connect using a different user along with the correct username & pw. It almost got me there except the next time I logged on, the mapped drive still failed – retained the correct domain name and user but still promted for a pw.

    I did not try the second half of your suggestion (the last ditch effort) but I did use your command line example along with another thread I found that works all of the time. The link on the how to is

    Since this approach activates on each logon, I did not need to use your persistent option, but did of course need to use your user name and pw command line example.

    My little batch file used in conjunction with the above referenced tutorial consists of one line:

    The process described in the tutorial along with this batch/script file creates a P: drive on the Windows 2008 server whenever the XP box has a user who is setup to run the script. The XP box does not logon to the actual domain. The shared script folder doesn’t even have to reside on the C drive, so there must be something special about the “netlogon” share name within the Windows environment that I don’t grasp. But it does work each and every time.

    Your Last Ditch Effort also seems logical. That’s the joy of Windows – only 30 million different ways to accomplish a task.

    Thanks for the examples on how to get things done via the command line.

  9. Wes

    Yes… Net Use hasn’t really changed much over the years, but what about using a DFS namespace as the share instead of the server name. Currently we have scripts that use Net Use on W2K3 boxes that map drives to a \\domain\data\share\, but I can’t seem to get that to work on a W2K8 box.

    Anyone got an idea?

  10. Abu

    Could you give me the reason what is the use of mapping a network drive?

  11. MrGroove

    @Wes – Hi Wes, sorry but it looks like I missed your comment. My recommendation is to post questions in our forum – Our forum is designed for question and there’s many more people watching and answering questions as they come in.

    In regards to your question, I’ve had no issues connecting to DFS shares from my Server 2008 boxes. Plz post your exact problem in our Forum.

    @Abu – Mapping a network drive allows you to access windows shares (data) which reside on different servers.

  12. Andy

    Nice. How can you tell if your drives are mapped Persistent in Windows server 2003? I am getting ready to do a migration from a windows 2003 server cluster to a windows 2003 server on a VM.


    • MrGroove

      Great question. My first answer would be to just Reboot and see what happens. :) If they are still there then they are Persistent. Another idea if you don’t want to reboot a cluster node is to just delete the drive mapping then map the drives again using the persistent switch.

      Let me know here or in the forum ( if you find a better answer! :)

  13. Lee

    When mapping to our server windows 7 is not allowing me to map to drive F: is there a reason for this? please advise


    • MrGroove

      That should only happen if you already have something mapped to the F drive. To check, open Explorer (Hotkey Windows Key + E) and look for an F drive OR, open command line and type Net Use

      If that fixes it for ya perfect otherwise post your follow-up in our Forum ( ) as about a dozen ppl will help me answer your question and it’s a bit easier to troubleshoot issues there than fill up comments here.


  14. Lee

    Okay I tried net use and it didn’t work it says system error 67 has occured??

  15. B

    Very helpful, but it did not work for me, I was wondering can you map a drive from Windows 7 to MS Server 2000. Maybe the is my real issue.

    Thank you,

    • MrGroove

      @B – Yes of course. As long as the Windows Server 2000 server is sharing out the drive and you have permissions. Ping the server to make sure you can see it and also confirm permissions.

  16. B

    I can ping the server’s IP address and I can ping the server. I checked the permissions on the current user (admin) and the new user I made (bobby) and neither one of them can get to the share. I did take another XP laptop that has never been on the network and WAS able to map the same drive using the (admin) and the (bobby) user. But still cannot get the Win-7 laptop to map the same drive

  17. Cman

    Mr. Groove,

    I have a Windows Server 2003 Command Line book suggesting using the /SAVECRED
    switch (saving credentials locally)
    Do you have any idea if that works for Vista/Windows 7…..?


  18. Steve

    Speaking of mapping drives on 2008 server…

    Has anyone tried to map an ssl webdav drive using server 2008 r2? I would like to map to I can do this on Win7 but fail to find a way to successfully map an SSL “network location”

    The reason for doing this is to map a drive letter for RDS users so when they start a term session on 2008r2 they get that mapped drive.

  19. Jen

    I have the same password problem Craid had (Aug 08) but am not well versed in computer lingo. Can you dumb it down for me? I tried making adding a windows credential like you said, but am not really sure what I am doing. Do I put in the folder I am trying to access? and my work username and pswd?

  20. Gary

    Nice one, thanks.
    I wrote a simple .bat using your cmd… Actually maps quicker too than the GUI way…
    Thanks again.

  21. george atkins

    I have a batch file for remapping network drives. It works perfectly under XP in Novell. The batch file fails with Windows 7. Here is an example:

    REM – Change drive mapping of S to home directory
    MAP ROOT S:=\\Ncscluster_volp_server\volp\esc\staff\george_atkins\projects

    Error: “This utility was unable to initialize the country information.”
    I’ve checked the country info in Control Panel and there appears to be nothing wrong or missing. This batch file works perfectly under XP, as I said.

    I also tried to use the following command, but it fails with Error 85:
    net use s: \\Ncscluster_volp_server\volp\esc\staff\george_atkins\projects

    Drive S is already a network drive map, of course, which is why I have the batch command in the first place, so I can temporarily remap to another network location.
    Any help? This has to be resolved using batch files or something similar.

    • MrGroove

      Hi George,

      For the second command IE: “Net use” Try to first remove the mapping before you create the new mapping.

      net use /d s:

      Once the drive is gone then retry your new mapping. You might also try to map the drive only to the \\server\share\ rather than all the way down to the folder level of “Projects”.

      Give those 2 ideas a try and check back if needed!

  22. George M

    hey there , i just want the script for windows seven that reconnect the all AD users with the allready maped drive , i have server 2k8 r2 and user using windows 7 ,
    thank you .

    • George M

      I didnt get any reply about the script till now , thnx .

  23. Ernie

    Was very helpful. Thanks

    • Steve Krause

      @bee53436f6a63258d5eb1ea9732adc2a:disqus You bet! Glad I could help ya!

  24. Dhiraj Gaikwad

    Can this possible to add diffrent types of network drivers in windows 7 defult location..

    Windows 7 defult drivers repository..

    • Steve Krause

      Hi @32fb3045bb99a1baca45aea2c83222f9:disqus, I don’t quite follow your question. Can you say that again?



  25. Robby Suhendra

    Is there any command on .bat file that could facilitate renaming the drive letter label??? because i am using .bat file to map the network drive, and want to hide the path that shown on that drive letter label.

    Please advise.

    • Steve Krause

      Are you worried about someone looking at your script and seeing the path or creds?

      Sent from my Mobile

      • Robby Suhendra

        Yup… ^_^… I am afraid about all of that, user can see the the path so the user well known about where the actual address of that share on the server and screwed up with creds also.

  26. jacks

    hi, i tried all the steps you gave me is very much easy and also i have share the public file on the windows server 2008 which to me it should be able map from any computer but i tried many computers yet they all still as for network credentials but i haven’t set any thing like that. Can you please help me? as to how to disable that little problem if there is a way.

  27. Ariel

    because of restrictions with my ISP, port 445 is blocked. I have been able to connect using alternate ports (ie. 40445, 45445, etc). is there a way to map a network drive using a different port?

Leave a Reply

Your email address will not be published. Required fields are marked *


To Top