Creating a Drive Mapping GPO –
Map network drives with a Group Policy Preferences (GPP) Drive Maps item under User Configuration, targeted by security group. This replaces logon scripts (net use) and applies at every logon and background refresh.
Applies to: Windows Server 2016 and later domain controllers; Windows 10/11 domain-joined clients.
Audience: Help desk and systems administrators with rights to create and link GPOs.
Example used throughout: map S: to \\FS01\Shared\Finance for members of GG-Finance-Users.
Prerequisites
- Rights to create GPOs and link them to the target OU (Domain Admins, Group Policy Creator Owners, or delegated).
- Group Policy Management Console (GPMC) installed — on a DC, or via RSAT on a workstation.
- The share exists and is reachable by its UNC path (
\\FS01\Shared\Finance). Use the FQDN or a DFS namespace path if clients span sites. - Share and NTFS permissions grant the target group access. The GPO maps the drive; it does not grant access.
- A security group for the users who get the drive (e.g.
GG-Finance-Users), with members populated. - The OU that holds the user accounts is identified. Drive maps are a user setting, so link to a user OU, not a computer OU.
Naming convention:
U - Drive Maps - <Dept or Scope>(e.g.U - Drive Maps - Finance). TheUprefix flags a user-side GPO.
Step 1: Create and link the GPO
- Open Group Policy Management (
gpmc.msc). - Expand Forest > Domains > <your domain> and select the OU that holds the target user accounts.
- Right-click the OU and choose Create a GPO in this domain, and Link it here…
- Name it
U - Drive Maps - Financeand click OK. - Optional: right-click the new GPO, open GPO Status, and choose Computer Configuration Settings Disabled. This skips the empty computer side and speeds processing.
To stage the GPO before it goes live, create it under Group Policy Objects first and link it after testing.
Step 2: Configure the Drive Map preference
- Right-click the GPO and choose Edit.
- Go to User Configuration > Preferences > Windows Settings > Drive Maps.
- Right-click Drive Maps and choose New > Mapped Drive.
- On the General tab, set the fields below.
| Field | Value | Notes |
|---|---|---|
| Action | Update | Creates the drive if missing, corrects it if changed. See the action table in Reference. |
| Location | \\FS01\Shared\Finance | Full UNC path. Use the FQDN or DFS path for multi-site. |
| Reconnect | Checked | Keeps the mapping persistent between logons. |
| Label as | Finance | Name shown in File Explorer. |
| Drive Letter | Use: S | Pick a letter not used by local or removable drives. |
| Connect as | Blank | Never store credentials here; they are not secure. |
| Hide/Show this drive | No change | |
| Hide/Show all drives | No change |
- Leave the Common tab open for Step 3, or click OK if no targeting is needed.
Step 3: Target by security group (item-level targeting)
Item-level targeting (ILT) lets one GPO hold many drive maps, each applied only to its own group.
- In the drive map properties, open the Common tab.
- Check Run in logged-on user’s security context (user policy option). This is required for user-specific shares and access-based enumeration.
- Check Remove this item when it is no longer applied if the drive should disappear when a user leaves the group. This forces the Action to Replace.
- Check Item-level targeting and click Targeting…
- Choose New Item > Security Group, click …, and select
GG-Finance-Users. - Leave User in group selected and click OK twice.
Repeat Steps 2–3 for each additional drive in the same GPO. For a drive every user gets (e.g. H: home), skip ILT and use %USERNAME% in the path: \\FS01\Home$\%USERNAME%.
Step 4: Scope and apply the policy
Leave Security Filtering as Authenticated Users when you use item-level targeting. ILT does the per-group filtering.
If you filter at the GPO level instead (one GPO per group):
- Select the GPO, open the Scope tab, and add the group under Security Filtering.
- Remove Authenticated Users from Security Filtering.
- Open the Delegation tab, click Add, choose Domain Computers, and grant Read. Since MS16-072, computers must be able to read user GPOs or the policy silently fails.
Confirm the link is Enabled and that no higher-precedence GPO or Block Inheritance on a child OU stops it. Changes reach clients at next logon or within the 90–120 minute background refresh.
Verification and testing
Test with one user in the target group on one client before wide rollout.
- On the client, signed in as the test user, run:
gpupdate /force- Sign out and back in (drive maps apply most reliably at logon).
- Confirm the drive shows in File Explorer with the right letter and label, and opens.
- Confirm the GPO applied:
gpresult /r /scope userU - Drive Maps - Finance should be listed under Applied Group Policy Objects. For full detail, run gpresult /h C:\Temp\gp.html and open the report.
- List current mappings:
net use- Test the negative case: sign in as a user not in the group and confirm no
S:drive appears.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
GPO not in gpresult applied list | Linked to a computer OU, link disabled, or blocked inheritance | Link to the user OU; check link status and inheritance in GPMC |
| GPO listed as “Denied (Security)” | Authenticated Users removed with no Domain Computers Read | Add Domain Computers with Read on the Delegation tab |
| GPO applies but no drive appears | User not in the ILT group, or group change not yet in the user’s token | Verify membership; user signs out and back in |
| Drive shows with red X / disconnected | Drive mapped before network is ready (Wi-Fi, VPN) | Enable Always wait for the network at computer startup and logon (Computer Config > Admin Templates > System > Logon) |
| “Access denied” when opening drive | Share or NTFS permissions missing | Grant the group access on the share and folder |
| Wrong letter or old path persists | Action set to Create, which never changes an existing map | Change Action to Update or Replace |
| Drive not visible to elevated apps | UAC split token; admin and standard sessions keep separate maps | Set EnableLinkedConnections = 1 (DWORD) under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System, then reboot |
For deeper detail, check Event Viewer > Applications and Services Logs > Microsoft > Windows > GroupPolicy > Operational on the client.
Reference
Drive map actions
| Action | What it does | Use when |
|---|---|---|
| Update | Creates the map if missing; updates path or label if changed | Default for most drive maps |
| Replace | Deletes and recreates the map at each refresh | Forcing a clean mapping; required by “Remove when no longer applied” |
| Create | Creates the map only if the letter is free; never changes it | Rarely; changes made later will not apply |
| Delete | Removes the mapping for that letter | Retiring a drive or clearing a legacy script map |