We help top organizations stay competitive, by implementing the latest disruptive technologies.

Latest Posts

Convert the Ivanti macOS Agent into an MDM Ready PKG

Convert the Ivanti macOS Agent into an MDM Ready PKG

Did you purchase one of those new MacBook Pros with 32 GBs of RAM only to find out that you cannot use Ivanti Provisioning to prep it for your environment? If you did, it’s likely you’re not the only one.

The T2 chip employed in the iMac Pros and the new MacBook Pros prevent the machines from being able to use NetInstall. Therefore, provisioning is no longer an option in the way you’re thinking. However, not all is lost. If using DEP (if you’re not, you need to be), you can bootstrap the installation of the Ivanti Mac Agent on the heels of the device’s enrollment through MDM.

Then, once the full Ivanti agent is installed, you can kick of a shortened provisioning process to tackle just your system configuration items.

The instructions below will walk you through the process of converting your standard Ivanti Mac Agent DMG installer into a usable MDM package with an associated manifest file. While I’ve done what I could to automate much of this process, you are going to need a Mac, an Apple Developer Account, a valid Developer ID signing certificate, a custom script I wrote, and an HTTPS file share that has a valid end-entity certificate.

Apple Developer Account

Creating a developer account may prove to be more problematic than you’d hope for. If just building an individual account, it’s not so bad. However, if you’d like to sign up as an organization (which I do recommend) you’re going to need your D-U-N-S Number, a Legal Entity Status, Legal Binding Authority and a Website. Please see https://developer.apple.com/programs/enroll/ for further details and enroll.

Creating a Developer ID Certificate

OK, hopefully you made it through part one unscathed. Now, grab the Mac that will become the official and only machine that with the private key to sign your package files. We’ll continue by creating a certificate request for your Developer ID certificate. You need this specific Developer ID certificate as it allows you to distribute your Ivanti agent outside of the Mac App Store.

  1. Launch the application Keychain Access.
  2. From the file menu, select Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority.
  3. Enter your developer account email address.
  4. Enter any common name of your choice (i.e. Nine41 Developer ID Cert).
  5. Re-enter your developer account email address for the CA Email Address.
  6. Change the radio button to Saved to Disk.
  7. Press Continue.
  8. Save the resultant CertificateSigningRequest.certSigningRequest to your desktop.
  9. Click the Done button.
  10. Open a web browser and sign into https://developer.apple.com/account/ with your developer account ID.
  11. On the left-hand pane, press on the Certificates, IDs & Profiles button.
  12. Change the dropdown in the upper-left corner from iOS, tvOS, watchOS to macOS.
  13. Highlight the All button under Certificates.
  14. Click the + button at the top-right to create a new certificate.
  15. Select the Developer ID radio buttonfrom the Production section.
  16. Select the Developer ID Installer radio button.Note: You may need to elevate your account permissions to perform this action.
  17. Click Continue on the Create CSR page. This was done with steps one through nine above.
  18. Press the Choose File button and upload the CertificateSigningRequest.certSigningRequest file from step eight.
  19. Press the Download button to acquire your new Developer ID certificate.
  20. Press the Done button and you may close your browser.
  21. Double-click on the certificate and install it to Keychain Access. The Developer ID certificate should now display in the My Certificates section.
  22. Make note of your Developer ID Number in the title within parentheses (i.e. 3rd Party Mac Developer Installer: Nine41 Consulting LLC (M941ABC4AB)).

As mentioned above, this machine will be the only machine you can use to sign your PKG files, so keep track of the machine if you’ve used a VM.

Convert Your Ivanti Agent DMG to a PKG File

Alright, now that you have your Developer ID certificate, we need to create a PKG file that is deployable over MDM. Currently, Ivanti’s Mac Agent is built as a DMG, so we need to convert it to a PKG file and build a manifest file to deploy it through Ivanti’s MDM.

I’ve built some scripts that will convert the DMG to a PKG and build the manifest file for you. You simply need to update the manifest file with your HTTPS server URL.

  1. Open a web browser and download your Ivanti Mac Agent from your Core Server (i.e. http://coreserver.domain.com/ldlogon/mac/.
  2. If the DMG mounted, unmount it.
  3. Open a second tab in your browser and download my agent conversion scripts from GitHub.
    Note: Please use these scripts at your own risk. Test and validate in your own environment. These scripts have not been validated by Ivanti nor will Nine41 be responsible for any adverse behavior.
  4. Extract the Nine41 MDM Mac Agent zip folder to your Desktop.
  5. Open the create createIvantiAgentPKG.sh found within the folder with a text editor.
  6. Add your Developer ID Number from step 22 above into the developerInstallerCert variable (i.e. developerInstallerCert=”M941ABC4AB”).
  7. Set your appropriate Agent Version (2018.1 is, 2018.1 SU1 is
  8. If desired, change the bundle identifier to something you prefer.
  9. Save the script.
  10. Open a Terminal prompt.
  11. Set execute permissions on the script (chmod 755 /path/to/createIvantiAgentPKG.sh).
  12. Change directories within Terminal to the Nine41 MDM Mac Agent folder (i.e. cd ~/Desktop/Nine41\ MDM\ Mac\ Agent/). Note: It is critical you change your directory path to be inside the Nine41 MDM Mac Agent folder. If you don’t do this, the script will fail to write the pkg to the correct location.
  13. Run the script and point it to your agent by typing ./createIvantiAgentPKG.sh followed by the path to your agent (i.e. ./createIvantiAgentPKG.sh ~/Downloads/Production\ macOS\ Agent.dmg).
  14. Upon completion, you should have an Agent folder within your main Nine41 MDM Mac Agent folder with two files, the IvantiMacAgentMDMReady.pkg and the manifest.plist. If you open the manifest.plist file with a text editor, you should see an md5s array with hash values that match the output of your Terminal window. The sizeInBytes key should also match. These two items are critical, spend the time now to do a quick review.

  15. While you have the manifest file, you also need to update the URL string to match that of your HTTPS share. This HTTPS server needs to be accessible from anywhere and needs to have a valid certificate that can be verified by the device.
  16. Copy the Agent folder and files to your HTTPS share (ensuring the path matches that of your manifest.plist URL string).
Create a Macintosh MDM Manifest Package and Deploy

To deploy the agent to an MDM enrolled Mac, we need to build a Macintosh MDM Manifest package with the data we stamped into the pkgbuild process.

  1. Open the Ivanti Management Console from either a Remote Console or the Core Server.
  2. GotoTools>Distribution>DistributionPackages.
  3. Select either My Packages or Public packages from the menu tree.
  4. Press the New button (green circle with the white plus symbol).
  5. Select Macintosh > Macintosh MDM.
  6. Label the package (i.e. Agent MDM Manifest)
  7. Select the Manifest URL radio button.
  8. Enter the URL to your manifest.plist file (i.e. https://yourHTTPSServer/Agent/manifest.plist)
  9. Enter the Bundle ID as com.ivanti.macOS.agent unless you changed it in step eight in the previous section.
  10. Enter the Agent Version (2018.1 is, 2018.1 SU1 is
  11. Click Save.
  12. Right-click on the package and select Create Scheduled Task.
  13. Right-click on the scheduled task and select Properties.
  14. Target your MDM enrolled Mac(s).
  15. Set your Task Type under Task Settings to Push.
  16. Schedule your Task.
  17. Click Save.
Troubleshooting on the Client

Troubleshooting MDM tasks can be a bit cumbersome. Included in the scripts folder are two commands that when run from Terminal, will tell you a great deal about the MDM task itself. If your agent doesn’t show up as installed within a couple of minutes of the task saying successful on the core, you may need to start the two Terminal commands and start your task again to try and catch the error.

  • Command 1: log stream –info –debug –predicate ‘processImagePath contains “mdmclient” OR processImagePath contains “storedownloadd”‘
  • Command 2: log stream –info –debug –predicate ‘subsystem contains “com.apple.ManagedClient.cloudconfigurationd”‘

Also, you can look at the /tmp folder to see if the agent files are getting copied down. If you see them there, you can begin to look at the /Library/Application Support/LANDesk folder for additional details. Another useful command to run would be the Ivanti client output log: log show –predicate ‘processImagePath contains “LANDesk”‘ –debug –info –last 1d >> ~/Desktop/Landesk.log. However, this output will only be valuable if the agent is installing to some degree.


Once you have the agent successfully installed, you can perform any and all of your standard tasks, including sending down a provisioning task that just contains the System Configuration actions. In a future blog, I’ll write about how you can kick off provisioning on the tails of a successful agent install so you can have the machine pre-targeted or select the provisioning template right from the desktop. In the meantime, enjoy that new MacBook Pro. And, if you need help, we do consulting work, don’t be afraid to reach out.

No Comments

Post A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.