Run scripts On-Demand from Company Portal

Run On-Demand Scripts via Intune with a Dummy PKG

Ever wished you could give users the ability to run a script from the Company Portal?
Whether it’s installing an app via Installomator, triggering a cleanup, or running a custom fix script — it’s all possible by wrapping your logic into a script and using a dummy package.

This guide shows you how to build a lightweight PKG with no payload, attach a script to it, and deploy it via Microsoft Intune. Users can then trigger it on demand directly from the Company Portal.

And yes — it works beautifully on macOS.


Why use a dummy package?

macOS in Intune requires .pkg format for app deployments. But what if you don’t want to install an app — just run a script?

This method lets you:

  • Provide optional, user-initiated tasks
  • Avoid wrapping full app installers
  • Deploy fixes, maintenance, or utilities without managing payloads

Use cases include:

  • Install optional software (e.g., Adobe Reader, Zoom)
  • Reset OneDrive, Teams, or Outlook settings
  • Mount network drives
  • Trigger macOS cleanup or setup tasks

Create the dummy PKG file

Step 1 – Download the tool to make the PKG dummy package

Here I use the tool from Araelium, Package Builder: https://www.araelium.com/packagebuilder
Can be used for Trial mode, as we will not see the wizard, but 25$

Step 2 – Open to and fill out: Name, Identifier and Version

Step 3 – Click on the hammer, to save the pkgbuilder project

Step 4 – Click on the hammer again, to save as a PKG file

Step 5 – Click Close – and you now have a dummy PKG file we can use.


Prepare the package / Script in Intune and assign it.

Step 6 – In Intune > Apps > macOS > Click Create and Select

Step 7 – Click Select app package file. Now select the dummy package

Step 8 – Insert Publisher, Select Logo and Click Next

Step 9 – Copy the code this code:

#!/bin/bash
# Download Installomator
curl -fsSL https://raw.githubusercontent.com/Installomator/Installomator/main/Installomator.sh -o /usr/local/bin/Installomator
chmod +x /usr/local/bin/Installomator
# Run Installomator with explicit install parameters
sudo /usr/local/bin/Installomator adobereaderdc DEBUG=0

Step 10 – Insert the code under Pre-Install script, Click Next
All these Apps from Installomator can be used: https://github.com/Installomator/Installomator/blob/main/Labels.txt

Step 11 – Select Minimum operation system that match your need.

Step 12 – Detection rules
Here you can remove the last part of the App Bundle ID – so it only has this: com.simsen.adobereader

Step 13 – Now assign to All users as Available for enrolled devices and Click Next

Step 14 – Verify all settings and Click Create

Step 15 – Now user can run the app/script, when they need it.
Instead of an app – it could be all kinds of scripts that do self-service for user.
Maybe more on that later.