Create a drive mapping using Intune on Azure AD joined devices (Manual)
Posted On September 7, 2019
With the transition to Azure AD, you might want to connect your AAD joined devices to the traditional file server as explained in this article: Go Azure AD Joined with on-prem DC and fileserver The next step is to map some network drives with Intune!
Step 1: The first step is to create a PowerShell script that will do the actual drive mappings. This script will be placed on a Azure Blob storage (or your internal domain) where you will be able to manage and maintain the script. This script will be run using a second script that we will deploy with Intune. For your convenience I’ve already prepared the script:
You will need to change a few lines, the first one is the internal domain name of your domain. The second part to change is the actual drive letters, change this to your own needs, duplicate or remove blocks where required. Run the PowerShell script on a test laptop to verify that it’s working as it should.
Step 2: Now that we have a tested and working script, we will upload it to Azure. First create a storage account. From there go to Blobs, and add a new container
Give the container the name drivemapping, or anything that you like 😉 Make sure you enable anonymous read access for blobs only
Now upload your PowerShell script…
Once uploaded, copy the public URL and save it. We will need it in the next script.
Step 3: Now that we have prepared our DriveMapping script we are going to deploy the execution script to all clients using another script that we will deploy using Intune. So, again I made it easy, here is script 2: