Intune Drive Mapper
A PowerShell script that maps network drives on Intune-managed Windows devices. No Group Policy required.
What it does
- Maps drives in user context. Drives appear in File Explorer for the logged-on user, not the SYSTEM account
- Auto-resolves your AD domain via a
{domain}token in the path. No manual FQDN needed for domain-joined machines - Optional per-drive AD group filtering read from the logon token. No LDAP queries, no RSAT dependency, works over VPN
- Never removes a working mapping unless the new target is verified reachable first. A broken config can't delete a drive users depend on
- Safe to re-run (idempotent). Already-correct drives are detected and skipped; runs safely on a schedule or each time Intune checks in
- Logs every action, skip, and warning to
%LOCALAPPDATA%\Atliso\DriveMapper.logwith timestamps
Configuration
You edit one block:
PowerShell
Preview snippet. The full, tested script lives in the vault.
# ══════════════ EDIT THIS BLOCK FOR YOUR ENVIRONMENT ══════════════
# {domain} expands to your AD DNS domain automatically.
# GroupFilter is optional - the drive only maps if the user is a member.
$DriveMappings = @(
@{ Letter = "S"; Path = "\\fileserver.{domain}\shared"; Label = "Shared" }
@{ Letter = "H"; Path = "\\fileserver.{domain}\home\$env:USERNAME"; Label = "Home" }
@{ Letter = "F"; Path = "\\fileserver.{domain}\finance"; Label = "Finance"; GroupFilter = "Finance-Team" }
)| Field | Description |
|---|---|
Letter | Drive letter to map (single character, no colon) |
Path | UNC path to the share; {domain} auto-expands to your AD DNS domain at runtime |
Label | Name shown in File Explorer for the mapped drive |
GroupFilter | Optional. Comma-separated AD group names; drive only maps if the user is a member of at least one |
$RemoveUnlistedDrives | Optional flag, default $false. When $true, removes any mapped drives not present in the config |
Deploy in Intune
- In the Intune admin center: Devices > Scripts and remediations > Platform scripts > Add > Windows 10 and later. Upload
Atliso-DriveMapper.ps1. - Set Run this script using the logged on credentials: Yes. Drives are per-user objects; running as SYSTEM maps drives into the SYSTEM session where the logged-on user never sees them. This is the most common mistake with Intune drive mapping.
- Set Enforce script signature check: No (unless you sign your own scripts) and Run script in 64-bit PowerShell Host: Yes.
- Assign to a user group, not a device group. The right people get the right drives on whatever machine they log into.
Full walkthrough with screenshots: Deploying Drive Mappings via Intune Without GPO
Version history
Scripts are checked against each month's Windows and Intune changes and patched when something breaks. Every version stays available: if a newer one misbehaves in your environment, use the one before it and reply to any Atliso email to tell me.
v1.0.0Latest
Download v1.0.0 from GitHubFirst public release. Tested on Windows 11 24H2. See README for deployment.
Get Intune Drive Mapper
We'll send the script plus the deployment checklist, and updates when Microsoft changes something. No spam.