Skip to main content
Intune accepts one shell script per policy, and it has no script parameters. Generate a standalone installer for your platform with your SafeDep Cloud credentials embedded, then upload that file.
A SafeDep subscription is required to sync PMG events with SafeDep Cloud.
You need a SafeDep Cloud API key and Tenant ID from app.safedep.io/settings/api-keys. Installs sync to Package Guard.

Install

  1. Clone pmg and generate the installer from scripts/mdm/:
    You can optionally add --config /path/to/config.yml to package a machine-wide config. Set cloud.enabled: true in that file.
Base64 is not encryption. Anyone who can read the uploaded installer in Intune can recover the credentials. Use a scoped, revocable API key. Do not commit the generated artifacts.
  1. Upload the generated installer through Intune, using the procedure for your platform:
    Follow Microsoft’s procedure for macOS shell scripts. Upload pmg_setup_install_macos_standalone.sh. Set Run script as signed-in user to No.
  2. Assign the policy to a device group. Use a recurring install frequency if new users can be added later. Each run configures the target users and runs pmg cloud sync for each one. A direct standalone upload in Intune cannot pass --cloud-sync-only to the script. Run the normal installer again when you need to sync or configure later users.
The generated script stays under Intune’s 1 MB size limit.

Uninstall

Upload the matching uninstaller from the same output directory (pmg_uninstall_macos_standalone.sh or pmg_uninstall_linux_standalone.sh), with the same platform settings as install. Do not assign the install and uninstall policies at the same time.

Other MDMs

Jamf, JumpCloud, and the script layout.

MDM scripts README

Source of truth in the PMG repo.