Intune Drive Mapper
PowerShell script to map network drives on Entra-joined devices via Intune. Replaces GPO drive mappings.
Tested against Intune service release 2507
Overview
A production-ready PowerShell script that maps network drives on Intune-managed, Entra ID-joined devices. Designed as a direct replacement for GPO-based drive mappings.
Features
- Maps multiple drives from a simple configuration array
- Cleans up stale mappings before creating new ones
- Sets friendly drive labels visible in File Explorer
- Runs in user context for proper network authentication
- Persistent across reboots via
-Persistflag
Parameters
| Parameter | Type | Description |
|---|---|---|
| $driveMappings | Array of hashtables | Each entry needs Letter, Path, and optionally Label |
Usage
Edit the $driveMappings array at the top of the script:
$driveMappings = @(
@{
Letter = "S:"
Path = "\\fileserver\shared"
Label = "Shared"
}
@{
Letter = "P:"
Path = "\\fileserver\projects"
Label = "Projects"
}
)Deploy via Intune: Devices > Scripts and remediations > Platform scripts. Run as user context, 64-bit host.
Requirements
- Windows 10/11, Entra ID-joined
- Intune-managed device
- Line-of-sight to file server (on-network or VPN)
- User must have NTFS permissions to the target paths
Source
Full walkthrough: Deploying Drive Mappings via Intune Without GPO
Get the script via email
We'll send you this tool plus updates when it changes. No spam.