Skip to content
MS Intune Simplifying macOS Management with Payloadless Packages Running Scripts with Admin Rights

MS Intune Simplifying macOS Management with Payloadless Packages Running Scripts with Admin Rights

Written By Anoop C Nair
Last Updated February 21, 2025
Posted In Intune
SHARE

Hey there, Let’s discuss about MS Intune Simplifying macOS Management with Payloadless Packages Running Scripts with Admin Rights. From a support standpoint, Microsoft provides full support for Intune and its capability to deploy scripts. Payloadless packages are a powerful tool that extends macOS app management functionality.

A payloadless PKG is a type of package file used mainly in macOS environments that does not include any actual application files or data. With Intune, we can deploy payloadless PKGs to manage macOS endpoints by utilizing the built-in management capabilities for macOS PKGs.

Payloadless packages are distributed through the macOS agent channel, they offer enhanced flexibility, and Users can leverage pre-install and post-install scripts to perform specific tasks before and after the package is executed.

Multiple app types are available for deployment from Microsoft Intune to managed endpoints, including macOS PKGs, which can also be used for payloadless PKGs. Let’s join to delve deeper into this fascinating topic through this post.

Patch My PC

What is Payload?

In computing and telecommunications, the payload is the part of transmitted data that contains the actual intended message. It is the essential content conveyed between a sender and a receiver.

MS Intune Simplifying macOS Management with Payloadless Packages Running Scripts with Admin Rights

One of the most effective applications of payload-less packages (PKGs) is the execution of scripts on demand. This ability allows for seamless and immediate script execution without the overhead of unnecessary file installations.

MS Intune Simplifying macOS Management with Payloadless Packages Running Scripts with Admin Rights - Fig.1
MS Intune Simplifying macOS Management with Payloadless Packages Running Scripts with Admin Rights – Fig.1

Prerequisites

Shell EnvironmentUser Permissions
The script should be run in a Bash shell on a macOS system.The script needs to be executed with root privileges.
MS Intune Simplifying macOS Management with Payloadless Packages Running Scripts with Admin Rights- Table.1

By deploying this via a payloadless app, we can make it available in the Intune Company Portal. To do this we’ll need to use a payloadless package (Intune Unmanaged PKG) and a post-install script (Intune PKG Post Install Script).

  • Upload dock.pkg to Intune: This empty PKG creates a receipt named com.intune.dock. For guided steps on uploading the PKG, refer to the following: Add an unmanaged macOS PKG app to Microsoft Intune. When you assign the package, ensure that you do it as soon as it is available.
  • Paste dock5. The contents are as Post Install Script: For this flow, ensure that waitForApps is set to false.
MS Intune Simplifying macOS Management with Payloadless Packages Running Scripts with Admin Right - Fig.3 Creds MS
MS Intune Simplifying macOS Management with Payloadless Packages Running Scripts with Admin Right – Fig.3 Creds MS

Microsoft Intune macOS App Types and Payloadless Package Support

Microsoft Intune provides a variety of app types that can be deployed to managed endpoints, including macOS Packages, which are also applicable for payloadless Packages. Here is a screenshot of the app types available for macOS in the Microsoft Intune admin center.

  • Apps > macOS > Add App > macOS app (PKG)
MS Intune Simplifying macOS Management with Payloadless Packages Running Scripts with Admin Right - Fig.4
MS Intune Simplifying macOS Management with Payloadless Packages Running Scripts with Admin Right – Fig.4

macOS Dock Configuration Deploy using Payloadless PKG

The following script modifies the desktop dock configuration for macOS endpoints. It can be deployed using a payload-less PKG. This snippet highlights the essential dock configuration settings.

(Omitted the preparation code lines)
# Check if apps are installed
if [[ “$waitForApps” == true ]]; then
echo “$(date) | Waiting for apps to be installed … “
wait_for_apps_installation 900 # Wait 900 seconds for apps to be ins
fi
#if useDockUtil is true, use dockutil to configure the dock
if [[ “$useDockUtil” == true ]]; then
echo “$(date) | Configuring dock with dockutil”
install_dockutil_if_missing
configure_dock_with_dockutil
else
echo “$(date) | Configuring dock with plist”
configure_dock_via_plist
fi

Examining the Use Cases of Payloadless Packages in Microsoft Intune for macOS - Fig.2 Creds MS
Examining the Use Cases of Payloadless Packages in Microsoft Intune for macOS – Fig.2 Creds MS

Need Further Assistance or Have Technical Questions?

Join theLinkedIn Page and Telegram group to get the latest step-by-step guides and news updates. Join our Meetup Page to participate in User group meetings. Also, Join the WhatsApp Community to get the latest news on Microsoft Technologies. We are there on Reddit as well.

Resource

LinkedIn Post of Intune support team and Intune support page

Author

Anoop C Nair has been Microsoft MVP for 10 consecutive years from 2015 onwards. He is a Workplace Solution Architect with more than 22+ years of experience in Workplace technologies. He is a Blogger, Speaker, and Local User Group Community leader. His primary focus is on Device Management technologies like SCCM and Intune. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security, Career, etc.

Written by

Anoop C Nair is Workplace Technology solution architect with 25+ years of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer. Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion

Join the discussion

Your email address will not be published. Required fields are marked *

Related guides

Intune

Simplify Windows Devices to Run Only the Required Applications using Intune

Key Takeaways Hey, let’s learn about Simplify Windows Devices to Run Only the Required Applications using Intune. This policy lets administrators replace the default windows shell with a custom or lightweight shell. it improves performance by using system resources and is useful for devices that run a dedicated application. If the policy is disabled or […]

AC Anoop C Nair 8 min read
Intune

Enhance macOS Compliance with Custom Security and Compliance Checks to Improve Device Security using Microsoft Intune

Key Takeaways In this post we are discussing about Enhance macOS Compliance with Custom Security and Compliance Checks to Improve Device Security using Microsoft Intune. Microsoft has announced the general availability of Custom Compliance Settings for macOS in Microsoft Intune. The feature helps organizations strengthen security controls while supporting many types of macOS management scenarios. […]

AC Anoop C Nair 4 min read
Intune

Manage Samsung Galaxy Firmware Versions to Improve Security and Compliance using Microsoft Intune

Key Takeaways In this post we are discussing Manage Samsung Galaxy Firmware Versions to Improve Security and Compliance using Microsoft Intune. Microsoft Intune has received a new update that expands firmware management capabilities for Samsung Galaxy devices through Firmware Versionsintegration. This enhancement gives IT administrators more control over firmware and operating system updates, helping them […]

AC Anoop C Nair 4 min read
Intune

MS Intune Adds Windows Registry Data Collection to Device Inventory for Single Values All Key Values and Subkeys

Key Takeaways Microsoft Intune 2607 introduces Windows Registry Data collection in Device Inventory, allowing IT admins to verify actual device configurations without relying on custom discovery or remediation scripts. Using the Properties Catalog, admins can collect registry information through Single Value, All Values Under a Key (Non-Recursive), or Same Value Across Subkeys. MS Intune Adds […]

AC Anoop C Nair 5 min read