Automating network drive mapping configuration with Intune

1 minute read

I’m thrilled to introduce the intune-drive-mapping-generator which creates PowerShell scripts to map network drives with Intune. The tool is open source and built on ASP.NET Core MVC.


The intune-drive-mapping-generator is your tool of choice to:

  • Generate an Intune PowerShell script to map network drives on Azure AD joined devices
  • Seamlessly migrate existing network drive mapping group policies
  • Generate a network drive mapping configuration from scratch
  • Use an existing Active Directory group as a filter to deploy all your drive mapping configurations within one script

This all happens without scripting effort. You receive a fully functional PowerShell script for the deployment with Intune.


This tool is designed to work best with the following components although it can be useful for other purposes(?) :

  • Azure AD Joined and Intune enrolled Windows 10 devices
  • Synced user account from Active Directory to Azure Active Directory (Azure AD Connect)
  • On-premises file servers


Export existing group policy

To convert your existing drive mapping group policy configuration, save the GPO as XML report with the group policy management console.

Import existing group policy

The import is quite self-explaining. Please do not make changes in the exported XML file. Just upload the previously exported file to the generator.

Configure security group filter

If you intend to use security group filtering simply enter the name of the (on-premises) Active Directory group which do you want to use for filtering. Existing security group filters from an imported group policy configuration are automatically detected and added. But currently only one, the first filter is imported.

Upload PowerShell script to Intune

The script creates a scheduled task on the client which triggers the script initially and afterwards on every user logon. If you want to update your configuration simply generate a new script and replace the existing in Intune. The recurring functionality is based on a scheduled task which will be created on the Windows 10 client as soon as the script is executed under system context like the Intune Management Extension does.

Intune config

Make sure that you enable the “Run script in 64 bit PowerShell Host” option.

Sample files and GitHub

If you want to test the functionality with exported group policy objects you can find some test-files on the project’s GitHub repository.

Please find additional documentation and troubleshooting steps on the GitHub repository wiki.