Subscribe to groovyPost.com

Windows Network Icon :: groovyPost.com

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 it’s done, apparently it’s not as easy as Microsoft probably intended…  Anyway, it’s really simple once I show you where it’s hidden so as an added bonus, I’ll also show you how to do it from the CMD line.

 

First, here’s the more common 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 groovyPost.com?  Leave a comment or post your question in the .

 

Email Updates

Just enter your Email Address Below to Receive our Groovy How-To Tutorials Daily, Free and Easy:


Related Articles


16 Responses to “Map a Network Drive using Windows 7, Vista or Windows Server 2008 [How-To]”

  1. shockersh says:

    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 says:

    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 says:

    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?

    Thanks.

  4. MrGroove says:

    @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.

    -MrGroove

  5. MrGroove says:

    @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 says:

    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 says:

    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
    -MrGroove

  8. craig says:

    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 http://www.windowsnetworking.com/articles_tutorials/wxpplogs.html

    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:
    net use P: \\MACHINENAME\FOLDERNAME\SUBFOLDERNAME /user:DOMAINNAME\username pw

    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 says:

    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 says:

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

  11. MrGroove says:

    @Wes – Hi Wes, sorry but it looks like I missed your comment. My recommendation is to post questions in our forum – http://www.groovypost.com/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 says:

    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.

    Thanks
    Andy

    • MrGroove says:

      @Andy,
      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 (http://www.groovypost.com/forum/ if you find a better answer! :)

  13. Lee says:

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

    Thanks

    • MrGroove says:

      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 ( http://www.groovypost.com/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.

      Thanks!

  14. Lee says:

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

Leave a Reply

For faster support, please post technical questions in our Community Forum, not the comments.