How to deploy Application (offline installer DMG) on Apple MacOS Devices using Microsoft Intune

Microsoft Intune does not support deployment of DMG file. As per the Microsoft documentation  : "Only .pkg files may be used to upload macOS LOB apps to Microsoft Intune. Conversion of other formats, such as .dmg to .pkg is not supported."
Microsoft Intune have provided support to deploy shell script to macOS. In the example below, I will deploy Adobe Acrobat Reader DC 2020.009.20063 DMG file on MacOS Device.

  1. Save following script as .sh package i.e. InstallAdobeReader.sh

    #! /bin/sh
    url=https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/2000920063/AcroRdrDC_2000920063_MUI.dmg
     
    set -x
    tempd=$(mktemp -d)
    curl $url > $tempd/AdobeReaderDC.dmg
    listing=$(sudo hdiutil attach $tempd/AdobeReaderDC.dmg | grep Volumes)
    volume=$(echo "$listing" | cut -f 3)
    package=$(ls -1 "$volume" | grep .pkg | head -1)
    sudo installer -pkg "$volume"/"$package" -target /
    sudo hdiutil detach "$(echo "$volume" | cut -f 1)"
    rm -rf $tempd
    set +x 
  2. Login to Microsoft Intune Portal and go to Devices > MacOS > Shell scripts , Click Add.

  3. Provide basic settings such as Name and Description to the script

  4. Provide script settings, upload the script saved in step 1 and set other preferences. 

  5. Provide assignment group i.e. group contain MacOS devices. It is a bet practise to test script with couple of test devices before wider deployment.

  6. Click Add to save script.

7.      You may force Sync on MacOS device from Intune Portal to sync policies.

8.     It may take few hours to update the script status on Intune console.


Comments

Post a Comment

Popular posts from this blog

How to enable iOS unmanaged apps to read managed contacts & write unmanaged contacts without compromising security using Microsoft Intune

Network Driver for HP Elitebook 840 G1