By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
10alert.com10alert.com10alert.com
  • Threats
    • WordPress ThreatsDanger
    Threats
    A cyber or cybersecurity threat is a malicious act that seeks to damage data, steal data, or disrupt digital life in general. Cyber threats include…
    Show More
    Top News
    Cross-Site Scripting: The Real WordPress Supervillain
    Cross-Site Scripting: The Real WordPress Supervillain
    12 months ago
    Hackers targeting your smartphone
    12 months ago
    Improved Version of CTB-Locker (Onion Ransomware) Emerges
    12 months ago
    Latest News
    Beware of scammers! Dangerous apps in the App Store
    2 days ago
    How To Limit Login Attempts on WordPress (+ Should You?)
    3 days ago
    Wordfence Intelligence Weekly WordPress Vulnerability Report (September 18, 2023 to September 24, 2023)
    3 days ago
    Two privilege escalation vulnerability in Simple Membership Plugin
    4 days ago
  • Fix
    Fix
    Troubleshooting guide you need when errors, bugs or technical glitches might ruin your digital experience.
    Show More
    Top News
    Cloudflare Notification about increase in ransom DDoS threats
    12 months ago
    Windows 11 build 25169 outs with new features
    12 months ago
    How to enable Bluetooth on Windows 11
    12 months ago
    Latest News
    How automatically delete unused files from my Downloads folder?
    8 months ago
    Now you can speed up any video in your browser
    8 months ago
    How to restore access to a file after EFS or view it on another computer?
    8 months ago
    18 Proven Tips to Speed Up Your WordPress Site and Improve SEO | 2023 Guide
    9 months ago
  • How To
    How ToShow More
    Detecting zero-days before zero-day
    Detecting zero-days before zero-day
    23 hours ago
    See what threats are lurking in your Office 365 with Cloudflare Email Retro Scan
    See what threats are lurking in your Office 365 with Cloudflare Email Retro Scan
    23 hours ago
    Network performance update: Birthday Week 2023
    Network performance update: Birthday Week 2023
    23 hours ago
    Cloudflare now uses post-quantum cryptography to talk to your origin server
    Cloudflare now uses post-quantum cryptography to talk to your origin server
    2 days ago
    Privacy-preserving measurement and machine learning
    Privacy-preserving measurement and machine learning
    2 days ago
  • News
    News
    This category of resources includes the latest technology news and updates, covering a wide range of topics and innovations in the tech industry. From new…
    Show More
    Top News
    The most Important Shortcuts Keys For Computer
    12 months ago
    What’s new in Chrome 88
    12 months ago
    Windows 11 might get floating Taskbar similar to macOS
    9 months ago
    Latest News
    How to enable extensions for Google Bard AI
    2 days ago
    Window 11 Copilot: 10 Best tips and tricks
    2 days ago
    How to create AI images with Cocreator on Paint for Windows 11
    3 days ago
    How to install September 2023 update with 23H2 features for Windows 11
    4 days ago
  • Glossary
  • My Bookmarks
Reading: How to map network drive from Command Prompt on Windows 10
Share
Notification Show More
Aa
Aa
10alert.com10alert.com
  • Threats
  • Fix
  • How To
  • News
  • Glossary
  • My Bookmarks
  • Threats
    • WordPress ThreatsDanger
  • Fix
  • How To
  • News
  • Glossary
  • My Bookmarks
Follow US
News

How to map network drive from Command Prompt on Windows 10

Tom Grant
Last updated: 8 December
Tom Grant 10 months ago
Share
5 Min Read

On Windows 10, you can quickly map a network drive in several ways, including from Command Prompt when you prefer to use command lines or create a script to access files stored on another computer.

Contents
Map network drive on Windows 10 from Command PromptDisconnect mapped network drive on Windows 10 from Command Prompt

When connecting to a network drive, Windows 10 essentially creates a “shortcut” that points to the shared folder with a drive letter and the username and password to access its content. Once a drive is mapped, it will appear on “This PC” under “Network locations” to quickly access files stored on another computer from File Explorer.

This guide will teach you the steps to use Command Prompt to map a network drive on Windows 10 and how to disconnect when you no longer need access to the shared folder.

  • Map network drive on Windows 10 with Command Prompt
  • Disconnect mapped network drive on Windows 10 with Command Prompt

Map network drive on Windows 10 from Command Prompt

To use the net command to map a shared folder as a drive, use these steps:

  1. Open Start on Windows 10.

  2. Search for Command Prompt and click the top result to open the console.

    Quick note: If you run the command as an administrator, the drive may not mount correctly and won’t appear in File Explorer. As a result, run the command as a standard user.

  3. Type the following command to map a drive assigning drive letter manually and press Enter:

    net use Z: DEVICE-NAME-OR-IPSHARED-FOLDER

    In the command, replace “Z” with the drive letter not already in use you want to use. Then replace DEVICE-NAME-OR-IP and SHARED-FOLDER for the computer name or IP address of the device hosting the shared folder and the name of the shared. For example, this command maps the ShareOne folder to the computer with the “Z” drive letter:

    net use Z: vm-betaShareOne
  4. Type the following command to map a drive assigning drive letter automatically and press Enter:

    net use * DEVICE-NAME-OR-IPSHARED-FOLDER

    In the command, the (*) is the option that allows the system to assign any drive letter that is not already in use. Then replace DEVICE-NAME-OR-IP and SHARED-FOLDER for the computer name or IP address of the device hosting the shared folder and the name of the shared. For example, this command maps the ShareOne folder to the computer:

    net use * vm-betaShareOne
  5. Type the following command to map a drive providing authentication details and press Enter:

    net use Z: DEVICE-NAME-OR-IPSHARED-FOLDER PASSWORD /user:USERNAME /persistent:yes

    In the command, replace “Z” with the drive letter not already in use you want to use. Then change DEVICE-NAME-OR-IP and SHARED-FOLDER for the computer name or IP address of the device hosting the shared folder and the name of the shared. The PASSWORD and USERNAME have to be replaced with the credentials to authenticate with the remote machine. The “persistent” option allows the folder to stay mapped after reboot. For example, this command maps the ShareOne folder providing the user credentials and making the mapping persistent:

    net use Z: vm-betaShareOne password /user:admin /persistent:yes

Once you complete the steps, the network folder will map on the device and appear in File Explorer.

Disconnect mapped network drive on Windows 10 from Command Prompt

To disconnect a network drive on Windows 10, use these steps:

  1. Open Start.

  2. Search for Command Prompt and click the top result to open the console.

  3. Type the following command to disconnect a mapped network drive and press Enter:

    net use z: /Delete  

    In the command, replace “Z” with the drive letter of the map you want to remove.

  4. Type the following command to disconnect all the mapped network drives and press Enter:

    net use * /Delete  

After you complete the steps, the mapped drives will be disconnected and no longer accessible from File Explorer.

While we focus this guide on Windows 10, you can use these steps on Windows 8.1, 7, and earlier versions. Use these instructions if you want to use File Explorer to complete this task.


Translate this article

TAGGED: Authentication, DoS, Windows
Tom Grant December 8, 2022 December 8, 2022
Share This Article
Facebook Twitter Reddit Telegram Email Copy Link Print

STAY CONECTED

24.8k Followers Like
253.9k Followers Follow
33.7k Subscribers Subscribe
124.8k Members Follow

LAST 10 ALERT

Detecting zero-days before zero-day
Detecting zero-days before zero-day
Apps 23 hours ago
See what threats are lurking in your Office 365 with Cloudflare Email Retro Scan
See what threats are lurking in your Office 365 with Cloudflare Email Retro Scan
Apps 23 hours ago
Network performance update: Birthday Week 2023
Network performance update: Birthday Week 2023
Apps 23 hours ago
Cloudflare now uses post-quantum cryptography to talk to your origin server
Cloudflare now uses post-quantum cryptography to talk to your origin server
Apps 2 days ago
Privacy-preserving measurement and machine learning
Privacy-preserving measurement and machine learning
Apps 2 days ago

You Might Also Like

Detecting zero-days before zero-day
Apps

Detecting zero-days before zero-day

23 hours ago
Cloudflare now uses post-quantum cryptography to talk to your origin server
Apps

Cloudflare now uses post-quantum cryptography to talk to your origin server

2 days ago
News

How to enable extensions for Google Bard AI

2 days ago
How To

Reminder: Enable two-factor authentication wherever you have it. This business

2 days ago
Show More

Related stories

How to upgrade to Windows 11 23H2 with Installation Assistant
How to install September 2023 update with 23H2 features for Windows 11
How to get the latest Windows 11 innovations
How to blur image background in Photos for Windows 11
How to download official Windows 11 23H2 ISO file
PHP Object Injection Vulnerability in Flatsome Theme

10 New Stories

Encrypted Client Hello – the last puzzle piece to privacy
Beware of scammers! Dangerous apps in the App Store
How to enable extensions for Google Bard AI
Reminder: Enable two-factor authentication wherever you have it. This business
​​Know exactly when your data is transferred to GoogleIn a world where our data is permanent
​​Fake correspondence with the iPhone interfaceIn a world where digital communication is
Previous Next
Hot News
Detecting zero-days before zero-day
See what threats are lurking in your Office 365 with Cloudflare Email Retro Scan
Network performance update: Birthday Week 2023
Cloudflare now uses post-quantum cryptography to talk to your origin server
Privacy-preserving measurement and machine learning
10alert.com10alert.com
Follow US
© 10 Alert Network. All Rights Reserved.
  • Privacy Policy
  • Contact
  • Customize Interests
  • My Bookmarks
  • Glossary
Go to mobile version
adbanner
AdBlock Detected
Our site is an advertising supported site. Please whitelist to support our site.
Okay, I'll Whitelist
Welcome Back!

Sign in to your account

Lost your password?