Skip to content

How to Map Network Drives Using Group Policy

Map network drives with Group Policy Preferences instead of logon scripts: create a Drive Maps item, use item-level targeting, and fix drives that won't appear.

MGMCSA Guru Team October 6, 2026 8 min read
Cover showing the Drive Maps node in Group Policy Preferences mapping a network share to a drive letter for a targeted security group

Mapping drives with a logon script is a habit from a decade ago. It still runs, but it’s clumsy: targeting different drives to different teams means if statements and group checks, errors are silent, and the next admin has to read your batch file to figure out what’s happening. Group Policy Preferences replaced all of that with a configuration item you point and click through, with proper targeting and actions built in.

The Drive Maps preference lets you map a share to a drive letter, decide whether to create, update, replace, or delete it, and target it to specific users or groups — without a single line of script. This guide covers building a Drive Maps item, choosing the right action (this is where most problems start), targeting it cleanly, and fixing the drives-don’t-appear issues that come up.

Why Preferences beat logon scripts

Group Policy Preferences treat a drive mapping as an object you manage, not a command you run. That brings a few concrete wins:

  • Item-level targeting — map a drive only for members of a security group, a specific OU, an operating system, or dozens of other conditions, all from a dialog.
  • Actions — create, update, replace, or delete a mapping, so one item can both add new drives and clean up old ones.
  • Error handling — failures are logged to the event log instead of vanishing, which makes troubleshooting tractable.

You still need a working file share with sane NTFS and share permissions behind it. Preferences map the drive; they don’t grant access. If the user can’t reach \\fileserver\finance in Explorer, a GPP item won’t change that.

Create a Drive Maps item

Build a GPO and link it where your users live, then edit it:

  1. In Group Policy Management, create a new GPO (for example Map-Drives) and link it to the OU containing your users.
  2. Right-click it and choose Edit.
  3. Navigate to User Configuration > Preferences > Windows Settings > Drive Maps.
  4. Right-click Drive Maps and choose New > Mapped Drive.

In the dialog, set:

Drive Maps item — key fields

Action Update (recommended for most mappings — see the next section)
Location The UNC path, e.g. \\fileserver\finance
Reconnect Ticked, so the drive persists across logons
Label as A friendly name shown in Explorer, e.g. 'Finance (F:)'
Drive Letter Use existing or assign a specific letter such as F:

Set the action to Update, enter the UNC path, tick Reconnect, give it a label, assign the drive letter, and click OK. That’s a working mapping for everyone the GPO applies to. The next two sections make it correct and targeted.

Choose the right action — this is where drives break

The Action field has four options, and picking the wrong one causes most “the drive keeps dropping” complaints.

Drive Maps actions

Create Maps the drive only if it doesn't already exist. Never updates it afterward.
Update Creates the drive if missing, refreshes its settings if present. The safe default.
Replace Deletes the existing mapping and recreates it on every policy refresh.
Delete Removes the mapping. Use it to retire an old drive letter.

Update is the right choice almost always. It quietly keeps the mapping correct without disturbing it.

Replace is the trap. Because it deletes and recreates the drive on every Group Policy refresh, an open file or an idle session can hit the moment the drive is briefly gone — which surfaces as the mapping disconnecting, an open document throwing a network error, or Explorer flashing the drive away and back. Microsoft has documented this exact behavior, where a Replace-based drive mapping disconnects and reconnects on each refresh and causes “network access was interrupted” errors. If your drives are misbehaving and the action is Replace, switch it to Update before anything else.

Target the drive with item-level targeting

A single GPO usually maps several drives, and not everyone should get all of them. Item-level targeting solves that without separate GPOs per team.

On the Drive Maps item, go to the Common tab, tick Item-level targeting, and click Targeting. The Targeting Editor lets you build conditions — the most common is Security Group:

  1. Click New Item > Security Group.
  2. Browse to the group, e.g. CORP\Finance.
  3. Confirm. Now the drive only maps for members of that group.

You can stack conditions with And/Or and even nest them. A typical setup maps a department share to its group and a shared “company” drive to everyone:

Example targeting plan

S: Company (all staff) No targeting, or target Domain Users
F: Finance Security Group = CORP\Finance
H: HR Security Group = CORP\HR
E: Engineering Security Group = CORP\Engineering

Targeting by group is far more maintainable than by user. Add someone to the Finance group and they get F: at next logon; remove them and it goes away. No GPO edits needed.

Apply and verify

Mapped drives apply at logon (and at background refresh for Update). To test without waiting:

gpupdate /force

Then log off and back on — drive maps fully apply during logon, so a refresh alone may not show the new drive. After logging back in, confirm the drive is there:

Get-PSDrive -PSProvider FileSystem
net use

To prove the GPO is reaching the user and see whether the preference applied, run the resultant-set-of-policy report:

gpresult /h C:\gpresult.html

Open that HTML report and look under the user’s settings for the Drive Maps preference and its result. If the GPO isn’t listed at all, the problem is GPO scope (link, security filtering, or the user being in the wrong OU), not the drive item itself.

When drives don’t appear

A handful of issues come up repeatedly:

  • Nothing maps. The GPO isn’t reaching the user. Check the link location, security filtering, and that the user account sits under the OU the GPO is linked to. gpresult /h tells you fast.
  • Drive shows a red X but works when clicked. Usually harmless — Windows shows reconnectable drives as disconnected until something touches them. The mapping reconnects on access.
  • Drive drops mid-session. Almost always the Replace action. Switch to Update.
  • Drive missing from an elevated command prompt. This is by design. User Account Control gives elevated processes a separate token, and drives mapped under the standard token aren’t visible to it. When you genuinely need the mapping in both contexts, Microsoft documents the EnableLinkedConnections registry value as the supported workaround:
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" `
  -Name "EnableLinkedConnections" -Value 1

A reboot is needed for that to take effect. Test it before rolling it out broadly, since it changes how mapped drives behave across the UAC token split.

Drive mapping checklist

  • GPO is linked to the OU where the user accounts live
  • Drive Maps item is under User Configuration > Preferences
  • Action is set to Update, not Replace
  • Reconnect is ticked so the drive persists
  • Item-level targeting maps each drive to the right security group
  • The underlying share grants the user share + NTFS access
  • Verified with gpresult /h after a fresh logon

Wrapping up

Group Policy Preferences make drive mapping a configuration task instead of a scripting one. Create a Drive Maps item under User Configuration, set the action to Update, point it at the UNC path, and use item-level targeting by security group so each team gets only the drives it should. That covers the vast majority of real-world setups cleanly.

When something goes wrong, the two usual suspects are the Replace action dropping drives mid-session and the GPO not actually scoping to the user. Check the action first, then confirm scope with gpresult /h. If you’re managing other settings the same way, the troubleshooting steps when Group Policy isn’t applying apply here too.

Frequently asked questions

Should I use Group Policy Preferences or a logon script to map drives?

Use Group Policy Preferences (Drive Maps). They give you item-level targeting, a choice of create/replace/update/delete actions, and built-in error handling without writing or maintaining script code. Logon scripts still work but they're harder to target and harder to troubleshoot. Most environments have moved to Preferences.

Where do I configure drive mapping in Group Policy?

In the Group Policy Management Editor, go to User Configuration > Preferences > Windows Settings > Drive Maps. Right-click, choose New > Mapped Drive, set the share path and drive letter, pick an action, and optionally add item-level targeting.

What's the difference between Create, Replace, and Update actions?

Create makes the drive only if it doesn't exist and never touches it again. Update creates it if missing and refreshes its properties if it exists — the usual choice. Replace deletes and recreates the drive every refresh, which can disconnect and reconnect it mid-session. Delete removes a mapping.

Why does my mapped drive disappear or show a red X?

A red X usually just means the drive hasn't been touched yet this session and will reconnect when opened. Drives vanishing entirely often trace back to the Replace action disconnecting them on each policy refresh, a share permission problem, or the user not being in the targeted group. Switch Replace to Update first.

Why don't my mapped drives appear in an elevated (admin) command prompt?

User Account Control gives an elevated process a separate logon token, and drives mapped in the normal token aren't visible to it. This is expected behavior. Microsoft documents the EnableLinkedConnections registry value as a workaround when you genuinely need the mapping visible to both tokens.

How do I map a drive only for certain users or groups?

Use item-level targeting on the Drive Maps item. On the Common tab, enable Item-level targeting and add a condition such as Security Group. The drive then maps only for users who match — for example, only members of the Finance group get the F: drive.

Sources & further reading

Official vendor documentation referenced while writing this guide.

MG

MCSA Guru Team

IT & Systems Administration

We are working IT pros and system administrators who spend our days in Windows Server, Microsoft 365, and the wider Microsoft stack. MCSA Guru is where we write down the fixes and walkthroughs we wish we had found the first time.

MCSA Guru provides independent, educational IT guidance. Microsoft, Windows, Windows Server, Microsoft 365, Exchange, and Microsoft Teams are trademarks of Microsoft Corporation; Docker is a trademark of Docker, Inc. MCSA Guru is not affiliated with or endorsed by Microsoft or Docker. Always test changes in a safe environment before applying them in production.

Related guides

Fixing something right now?

Jump straight into the guide library or search for the exact error or task you are dealing with.