Keep Mapped Drives Connected During Sign-in in Windows

Abstract: Resolves the issue of mapped network drives disconnecting after Windows sign-in by enabling persistent connection settings.

Created: 2026-09-09 by

To keep mapped drives connected during sign-in in Windows, ensure the "Reconnect" option is enabled when creating or modifying the drive mapping via File Explorer or the command line. This setting persists the connection across reboots and log-offs by storing credentials and path details in the user's registry hive.

Understanding Persistent Drive Mapping

Mapped network drives are shortcuts that link a local drive letter (like Z: or Y:) to a shared folder on a remote server or another computer on your network. By default, Windows does not always guarantee that these connections survive a system restart or a user sign-out. When you disconnect from a network share, the association between the drive letter and the UNC path is removed from the current session. If the "Reconnect" feature is not explicitly activated, you must manually remap the drive every time you log back into your account. This behavior can be frustrating for users who rely heavily on specific network locations for daily tasks. The solution lies in how the mapping is created. When you use the standard Windows interface to add a network location, there is a specific checkbox that tells Windows to remember this connection. Without this flag, the drive appears as disconnected grayed-out icons in File Explorer until you double-click it to re-establish the link. This manual intervention breaks workflow automation and can lead to errors in applications that expect the drive to be available immediately upon login.

Using File Explorer to Enable Reconnection

The most straightforward method for most users is using the graphical interface of Windows File Explorer. This approach ensures that the correct UI elements are selected and reduces the risk of syntax errors associated with command-line tools. Open File Explorer and navigate to the This PC view. In the ribbon menu at the top, click on Computer and select Map network drive. Alternatively, you can right-click on any empty space within the drive list and choose Map network drive... from the context menu. A dialog box will appear prompting you for configuration details. In the Folder field, enter the full UNC path of the shared folder, such as \\ServerName\ShareName. You may also browse to find the share if you know the server name. Below the folder path, you will see two important options. Ensure that Reconnect at sign-in is checked. This is the critical step that persists the drive mapping. You should also check Connect using different credentials if the network share requires a username and password that differ from your current Windows login. Clicking Finish will establish the connection and save the preference. For those interested in automating file structure discovery on their networks, you might find our guide on how to Generate Folder Tree with Maximum Number of Listed Files in Subfolder for Windows useful for auditing what is actually available on those shares.

Command Line Configuration with Net Use

Advanced users and IT administrators often prefer the command prompt or PowerShell for scripting and bulk operations. The net use command provides a robust way to manage network connections. To create a persistent mapping, you must include the /persistent:yes switch. Open Command Prompt as an administrator or a standard user depending on your permissions. Type the following command, replacing the placeholders with your actual server and share information:
net use Z: \\ServerName\ShareName /persistent:yes
If the share requires specific credentials, you can append them to the command:
net use Z: \\ServerName\ShareName Password123 /user:Domain\User /persistent:yes
The /persistent:yes parameter instructs the Windows networking service to store this mapping in the registry so it is restored automatically during the next logon sequence. Unlike the graphical method, the command line does not have a simple checkbox; the persistence is entirely controlled by this flag. If you omit it, the drive will map only for the current session and disappear after a reboot. Note that removing a persistent drive requires careful handling. While net use Z: /delete removes the mapping, it is destructive to the configuration. For general troubleshooting, it is safer to simply disconnect the session temporarily rather than deleting the persistent entry from the registry unless you intend to permanently remove the drive letter assignment.

Troubleshooting Connection Issues

Even with persistence enabled, mapped drives may fail to connect due to network availability or credential issues. If a drive shows as disconnected with a red X, verify that the network adapter is active before the drive mapping process runs. Sometimes, the network stack initializes slower than the drive mapping routine. Check the event viewer for error codes related to network provider failures. Common causes include incorrect passwords stored in the Windows Credential Manager. If you changed your network password but did not update the stored credentials, the persistent map will fail silently. You can resolve this by going to Control Panel > Credential Manager > Windows Credentials and updating the entry for the network share. Additionally, ensure that the network location type is set correctly. If Windows classifies the network as "Public," it may block certain file sharing protocols. Changing the network profile to "Private" or "Work" in Settings > Network & Internet can resolve connectivity barriers. For more insights on system stability and error codes, reviewing topics like Windows FastStartup Error 0xC00000D4 on HP Victus 15 Laptop can provide context on how boot-time services interact with network resources.

Frequently Asked Questions

Why does my mapped drive disappear after a restart?

The drive disappears because the "Reconnect at sign-in" option was not enabled when the mapping was created. Without this setting, Windows treats the connection as temporary and clears it upon logout. Always verify the checkbox in the Map Network Drive dialog or use the /persistent:yes flag in the command line.

Can I map a drive without using a drive letter?

No, Windows mapped drives require a drive letter (A-Z) to function as a persistent shortcut in File Explorer. You can access shares via UNC paths directly without assigning a letter, but these cannot be saved as persistent "My Computer" entries. They will only exist as long as the explorer window is open or accessed via the address bar.

How do I fix a mapped drive showing a red X icon?

A red X indicates the network path is unreachable or credentials are invalid. First, ping the server to ensure network connectivity. Then, open Credential Manager and update the stored password for that specific share. Restarting the "Workstation" service in Services.msc can also refresh stale network sessions.

Is it safe to delete a mapped drive using net use /delete?

It is safe to delete the current session mapping, but it does not remove the persistent registry entry if one exists. To fully remove a persistent drive, you must use the /persistent:no switch or delete the entry via Group Policy or Registry Editor. Be cautious as deleting the wrong drive letter can disrupt dependent applications.

Does Windows 11 handle mapped drives differently than Windows 10?

The core mechanism for persistent drive mapping remains identical in Windows 11 and Windows 10. Both versions use the same underlying networking stack and registry keys for storing persistent connections. Any differences are limited to the visual appearance of the File Explorer ribbon, not the functionality of the mapping process.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More