Mapped Drive Not Connecting at Login: Fixes
Mapped drives fail at login due to timing, permissions, or policy. Diagnose and fix with built-in tools. No third-party cleaners.
When you sign in to Windows, a mapped drive that worked yesterday shows a red X or a disconnected state in File Explorer. The mapping is set to reconnect at sign-in, but the connection never establishes. This guide covers the three causes that produce this symptom: the network not being ready when the mapping runs, permissions on the share, and Group Policy settings that override your mapping. Each has a distinct diagnosis and a distinct fix. Work through them in order; the least destructive fix is first.
Confirm the Symptom
The exact symptom is a mapped drive that appears in File Explorer with a red X, or a drive letter that is absent entirely after sign-in. Clicking the drive may prompt for credentials or show “The network name cannot be found.” If the drive connects when you click it or after you manually run net use, the mapping itself is valid; the problem is that it did not run at the right time or with the right permissions.
Cause 1: The Network Is Not Ready When the Mapping Runs
Windows runs logon scripts and drive mappings early in the sign-in process. On a machine with Wi-Fi or a slow network stack, the network adapter may not have an IP address or a connection to the domain controller yet. The mapping command fails because the server is unreachable at that instant. This is the most common cause on laptops that resume from sleep or on machines that boot and sign in quickly.
How to Confirm
Check the event log for the time the mapping failed. Open Event Viewer (eventvwr.msc), go to Windows Logs > System, and look for events from source GroupPolicy or User Profiles around the sign-in time. A failed mapping often logs an error like “The specified network name is no longer available” or “The network path was not found.” If the error timestamp is within a few seconds of sign-in and the drive connects manually afterwards, timing is the cause.
Another confirmation: after sign-in, open a Command Prompt and run net use. If the mapping is absent or shows “Unavailable”, then run net use Z: \\server\share manually. If that succeeds, the mapping itself is fine; the automatic run failed.
The Fix: Delay the Mapping
Do not disable the network adapter or change power settings as a workaround. Instead, make the mapping wait until the network is ready. There are two built-in ways.
Option A: Use a logon script with a retry loop.
Create a batch file that attempts the mapping, waits, and retries if it fails. Place it in the Netlogon share or assign it via Group Policy. The script should look like this:
@echo off
set drive=Z:
set share=\\server\share
net use %drive% %share% /persistent:yes
if errorlevel 1 (
timeout /t 5 /nobreak >nul
net use %drive% %share% /persistent:yes
)
If the first attempt fails, the script waits five seconds and tries again. You can increase the timeout or add more retries. The timeout command is built into Windows; no extra tools are needed.
Option B: Use a scheduled task that runs at logon with a delay.
Create a scheduled task that triggers at logon and runs net use after a delay. In Task Scheduler (taskschd.msc), create a task with trigger At log on, set the delay to 30 seconds, and have it run the command net use Z: \\server\share /persistent:yes. This gives the network stack time to initialize.
Both methods are equally valid. The retry loop is more robust because it adapts to the actual network readiness rather than a fixed delay.
When This Fix Does Not Apply
If the drive does not connect even after a manual net use with the correct credentials, timing is not the cause. Move to Cause 2.
| Cause | Symptom | Fix | Does NOT apply when |
|---|---|---|---|
| Network not ready | Drive fails at login but connects manually | Delay mapping | Manual connection also fails |
| Permissions | Drive fails always, even manually | Fix share/NTFS permissions | Drive connects for other users |
| Group Policy | Drive mapping is removed or overridden | Adjust policy | Policy is not configured |
Cause 2: Permissions on the Share or NTFS
If the mapping fails consistently, even when you run net use manually, the account does not have permission to access the share or the folder. Windows evaluates two sets of permissions: share permissions and NTFS permissions. Both must allow the user. The effective permission is the intersection of the two.
How Permissions Are Evaluated
When a user accesses a network share, Windows first checks the share permissions (set on the share itself) and then checks the NTFS permissions on the folder. The effective access is the most restrictive combination. For example, if the share allows “Everyone: Read” but the NTFS folder allows “Users: Modify”, the effective permission is Read. If either denies access, the connection fails.
How to Confirm
Try to access the share manually with the same account that fails at login. Open File Explorer and type \\server\share in the address bar. If you get an “Access is denied” error, permissions are the cause. If you can access it from another user account on the same machine, the problem is specific to the failing account’s permissions.
Check the share permissions on the server: open Computer Management on the server, go to Shared Folders > Shares, right-click the share, and select Properties. The Share Permissions tab shows who has access. The Security tab shows NTFS permissions. Confirm the user or a group they belong to appears with at least Read (for share) and Read/Execute (for NTFS) to browse, or Modify to write.
The Fix: Grant the Correct Permissions
Do not take ownership of system folders or grant Everyone full control. That is a security risk and can break system functionality. Instead, grant the minimum permissions the user needs.
On the server, add the user or a group to the share permissions and to the NTFS permissions. For a typical user who needs to read and write, grant Change on the share and Modify on the NTFS folder. For read-only access, grant Read on both.
If the user is a domain user, add the domain group “Domain Users” to the share permissions rather than individual users, to simplify management.
After changing permissions, test the mapping again. Permissions changes take effect immediately; no reboot is needed.
When This Fix Does Not Apply
If the user can access the share manually but the mapping still fails at login, permissions are not the cause. Move to Cause 3.
Cause 3: Group Policy Overrides the Mapping
Windows Group Policy can define drive mappings that override or remove user-configured mappings. If a policy sets a drive letter to a different share, or explicitly removes a drive, the user’s mapping will not appear. This is common in corporate environments where IT controls drive letters.
How to Confirm
Run gpresult /r in a Command Prompt to see which Group Policy objects apply to the user. Look for a section on Drive Maps under User Configuration. If a policy defines the same drive letter, it will override the user’s mapping. Also check the event log for Group Policy errors.
The Fix: Adjust the Policy
If a policy is forcing a drive mapping, the user cannot override it. The administrator must modify the policy. In the Group Policy Management Console, navigate to User Configuration > Preferences > Windows Settings > Drive Maps. There, the policy can be set to Create, Update, Replace, or Delete. If it is set to Replace, it will overwrite any user mapping. To allow user mappings, the policy should be set to Create (only creates if not exists) or Update (updates existing).
If the policy is outside your control, you can work around it by using a different drive letter for your mapping, or by asking the administrator to adjust the policy.
When This Fix Does Not Apply
If gpresult shows no drive map policies, Group Policy is not the cause. The issue is likely Cause 1 or Cause 2.
What People Get Wrong About This
A common mistake is to blame permissions when the real problem is timing. The symptom is identical: a drive that fails at login. But a user who can manually connect the drive has a timing problem, not a permissions problem. The natural reaction is to check permissions first because that is the more familiar concept. However, the manual connection test is the quickest way to separate the two. If the manual connection succeeds, permissions are fine; the issue is that the automatic mapping ran too early.
Another mistake is to disable the network adapter or change power settings to “fix” the timing issue. That does not address the root cause and can cause other problems. The correct fix is to delay the mapping or retry it.
A third mistake is to take ownership of system folders or change NTFS permissions on the entire share to grant Everyone full control. That is a security risk and can break system functionality. The correct approach is to grant the minimum permissions needed.
Built-in Tools and Commands
Use these built-in tools to diagnose and fix the issue. No third-party software is needed.
net use– View or create drive mappings.gpresult /r– View applied Group Policy.eventvwr.msc– View event logs.taskschd.msc– Create a delayed scheduled task.
Viewing Current Mappings
net use
This lists all current drive mappings. If a mapping shows “Unavailable” or is missing, it did not connect.
Testing a Manual Connection
net use Z: \\server\share /user:domain\username
This attempts to map the drive manually. If it succeeds, the mapping is valid; the problem is timing. If it fails, check permissions or the server name.
Viewing Group Policy Results
gpresult /r
This shows which policies apply. Look for drive map policies under User Configuration.
Creating a Delayed Scheduled Task (PowerShell)
$action = New-ScheduledTaskAction -Execute 'cmd.exe' -Argument '/c net use Z: \\server\share /persistent:yes'
$trigger = New-ScheduledTaskTrigger -AtLogOn -User $env:USERNAME
$trigger.Delay = 'PT30S'
Register-ScheduledTask -TaskName 'MapDrive' -Action $action -Trigger $trigger
This creates a task that runs 30 seconds after logon. Adjust the delay as needed.
When to Reinstall or Recover
None of these fixes require reinstalling Windows. If the drive still fails after checking all three causes, the issue may be with the server, the network, or the account itself. Verify that the server is reachable (ping server) and that the share exists. If the problem persists, contact the network administrator.
Summary Table
| Cause | Symptom | Fix | Does NOT apply when |
|---|---|---|---|
| Network not ready | Drive fails at login but connects manually | Delay mapping | Manual connection also fails |
| Permissions | Drive fails always, even manually | Fix share/NTFS permissions | Drive connects for other users |
| Group Policy | Drive mapping is removed or overridden | Adjust policy | Policy is not configured |
Common questions
Why does my mapped drive disconnect after I restart my computer?
The drive mapping runs at sign-in, but the network may not be ready yet. The mapping fails silently, leaving the drive disconnected. Use a delayed script or scheduled task to retry after the network is up.
How do I fix a mapped drive that says 'network name cannot be found'?
That error usually means the server is unreachable at the time of the mapping. Check if the server is online and reachable. If it is, the issue is timing; delay the mapping or use a retry loop.
Can I use a batch file to map drives at login?
Yes. Create a batch file with net use commands and place it in the Startup folder or assign it as a logon script via Group Policy. Add a retry loop to handle network delays.
Why does my mapped drive work for other users but not me?
This indicates a permissions problem specific to your account. Check the share and NTFS permissions on the server and ensure your account has at least Read access.
Is there a way to make Windows wait for the network before mapping drives?
Yes. You can create a scheduled task that runs at logon with a delay, or use a logon script that retries the mapping after a few seconds. Both methods are built into Windows.
Read next
- chkdsk, SFC and DISM: Which One to Run and When Three repair tools with three different jobs. Why DISM comes before SFC, what chkdsk actually checks, and when chkdsk can finish off a failing drive.
- Access Denied on a Folder You Own: Fixes That Work Fix 'Access Denied' on folders you own. Understand permissions, UAC, and the correct fixes without taking ownership of system folders.
- Driver Signature Enforcement: Why It Refuses Why Windows refuses unsigned kernel drivers, what test signing actually changes, and an honest account of what is given up to load one.
- ARP and MAC Addresses: Finding the Hardware How a host finds the MAC behind an IP, why ARP never leaves the local network, and how a stale cache entry produces a confusing partial outage.
- Fix 'A required CD/DVD drive device driver is missing' During USB Install When Windows setup says a CD/DVD driver is missing but you're installing from USB, the real cause is usually USB port or media. Learn how to fix it.