This guide is part of a video series companion guide on setting up mapped drives on Intune devices - you can watch the video here S02E18 How to Map Network Drives on Microsoft Intune Devices - (I.T)! This is rather simple but I will be adding some useful bits of code for people who do not have an always on VPN solution for all those Work From Home scenarios.
Creating the script
Before we get started let me explain how this process works. We are going to create a script that we deploy via intune, which in turn will create a scheduled task to map the network drives at login. We will then be adding a few lines of code to also have it map on any network changes.
- Go to https://intunedrivemapping.azurewebsites.net/DriveMapping
- Follow the onscreen options to add/remove mapped drives as needed
- Select Download Powershell Script
- Edit the powershell script, near the bottom you will see the following line
- Remove everything below that point and add the following
Upload to Intune
- Navigate to https://endpoint.microsoft.com/
- Select Devices
- Select Scripts
- Select Add - Windows 10
- Give it a Name and select Next
- Select your script file and Next
- Assign to the desired user group and Next
- Select Add
Verify the Scheduled Task Exists
Once you have deployed the script to the selected group, you can sync Intune policies through Company Portal. Remember it can take up to 8 hours for this to appear. You should see a scheduled Task named
IntuneDriveMapping and the triggers should look like the below.
Jake Shackelford Admin/Contributor
Jake is one of our Admins but also our inaugural author and the main reason SysManSquad exists today.