Deploy via Jamf Pro

Prev Next

Automatically Enroll macOS Devices Using Jamf Pro

This article covers the configuration and deployment of the HP Insights macOS Agent using Jamf Pro on macOS devices.

Prerequisites

  1. Obtain a company-wide PIN from Workforce Experience Platform.
    • From the left menu of the platform click Settings > Preferences tab > Company Pin.
  2. Download the latest HP Insights macOS Application from https://workforceexperience.hp.com/software.
  3. Download and install the Jamf Pro Installer.pkg
  4. Copy and save the necessary script(s) based off of the below options to configure the application in Jamf Pro console:
    • If device does not need the option to hide the menu bar, copy the Enrollment.shscript text below.
    • If device needs the option to hide the menu bar, copy the Enrollment_Tray.sh script text below.
    • If device has already been enrolled with the HP Insights macOS Agent or auto-upgraded to macOS version 2.23.6 and wishes to have the menu bar icon to be hidden, copy the ShowTray.sh and HideTray.sh script texts below.

If device is enrolled, see the "Enrolled Devices" installation section below.

Scripts to Configure the Application in Jamf Pro Console

  1. Enrollment.sh
  • This script will enroll the device without user interaction through silent enrollment.
  • The CPIN will need to be updated within the script.
  1. Enrollment_Tray.sh (Applicable from macOS application version 2.23.6)
  • This script will enroll the device without user interaction through silent enrollment.
  • This will hide the tray (menu bar).
  • The CPIN will need to be updated within the script.
  1. ShowTray.sh (Applicable from macOS application version 2.23.6)
  • This script will show the tray (menu bar) icon.
  • This script is required for devices that have already enrolled the HP Insights agent.
  1. HideTray.sh (Applicable from macOS application version 2.23.6)
  • This script will hide the tray (menu bar) icon.
  • This script is required for devices that have already enrolled the HP Insights agent.

Enrollment.sh Script

In the below script, replace 'PIN' with the actual company PIN.

#!/bin/bash
APPLICATION_SUPPORT_DIRECTORY=/etc/APMAgent
PIN=#########

if [ -d $APPLICATION_SUPPORT_DIRECTORY ]
then
echo "Directory Exists"
else
echo "Directory Does not exist, creating directory"
mkdir "$APPLICATION_SUPPORT_DIRECTORY"
fi
echo "{\"PIN\":\"$PIN\"}" > "$APPLICATION_SUPPORT_DIRECTORY/enrollment.json"

if [ "$APPLICATION_SUPPORT_DIRECTORY\enrollment.json" ]
then
echo "Successfully stored Data at
$APPLICATION_SUPPORT_DIRECTORY/enrollment.json"
cat "$APPLICATION_SUPPORT_DIRECTORY/enrollment.json"
exit 0
else
echo "Unable to store Data"
exit 1
fi
exit 1

Enrollment_Tray.sh Script

In the below script, replace 'PIN' with the actual company PIN.

#!/bin/bash
APPLICATION_SUPPORT_DIRECTORY=/etc/APMAgent
PIN=#########
if [ -d $APPLICATION_SUPPORT_DIRECTORY ]
then
echo "Directory Exists"
else
echo "Directory Does not exist, creating directory"
mkdir "$APPLICATION_SUPPORT_DIRECTORY"
fi
echo "{\"PIN\":\"$PIN\",\"HideTray\":\"true\"}" > "$APPLICATION_SUPPORT_DIRECTORY/enrollment.json"
if [ "$APPLICATION_SUPPORT_DIRECTORY\enrollment.json" ]
then
echo "Successfully stored Data at
$APPLICATION_SUPPORT_DIRECTORY/enrollment.json"
cat "$APPLICATION_SUPPORT_DIRECTORY/enrollment.json"
exit 0
else
echo "Unable to store Data"
exit 1
fi
exit 1

ShowTray.sh Script

#!/bin/bash
APPLICATION_SUPPORT_DIRECTORY=/etc/APMAgent
if [ -d $APPLICATION_SUPPORT_DIRECTORY ]
then
echo "Directory Exists"
else
echo "Directory Does not exist, creating directory"
mkdir "$APPLICATION_SUPPORT_DIRECTORY"
fi
echo "{\"HideTray\":\"false\"}" > "$APPLICATION_SUPPORT_DIRECTORY/enrollment.json"
if [ "$APPLICATION_SUPPORT_DIRECTORY\enrollment.json" ]
then
echo "Successfully create enrolment json at
$APPLICATION_SUPPORT_DIRECTORY/enrollment.json"
cat "$APPLICATION_SUPPORT_DIRECTORY/enrollment.json"
exit 0
else
echo "Unable to store PIN"
exit 1
fi
exit 1

HideTray.sh Script

#!/bin/bash
APPLICATION_SUPPORT_DIRECTORY=/etc/APMAgent
if [ -d $APPLICATION_SUPPORT_DIRECTORY ]
then
echo "Directory Exists"
else
echo "Directory Does not exist, creating directory"
mkdir "$APPLICATION_SUPPORT_DIRECTORY"
fi
echo "{\"HideTray\":\"true\"}" > "$APPLICATION_SUPPORT_DIRECTORY/enrollment.json"
if [ "$APPLICATION_SUPPORT_DIRECTORY\enrollment.json" ]
then
echo "Successfully create enrolment json at
$APPLICATION_SUPPORT_DIRECTORY/enrollment.json"
cat "$APPLICATION_SUPPORT_DIRECTORY/enrollment.json"
exit 0
else
echo "Unable to store PIN"
exit 1
fi
exit 1

Uploading and Configuring the Application in Jamf Pro Console

Configuring the HP Insights Agent differs depending on whether the device is enrolled or unenrolled in the HP Insights Agent. The instructions for both iterations can be found below:

Unenrolled Devices

  1. In the Jamf Pro console, click > Computers > Management Settings.
  2. Under Computer Management, select Packages.
  3. In the Packages window, click New to add the HP Insights macOS Application package previously downloaded.
    1. Display Name: Enter the name of the package
    2. Category: Select Applications
    3. Filename: Upload the HP Insights macOS Application package file
  4. Click Save.
  5. In Computer Management section, select Scripts.
  6. In the Scripts window, click New to add the HP Insights install script.
    1. Display Name: Enter the name the script
    2. Category: Scripts
  7. Click Save.
  8. Click the Script tab and copy the Script selected above. Ensure the in the script is replaced with the actual company PIN.
  9. Click the Options tab.
    1. In Priority, select After
  10. Click Save.
  11. Go to Computers tab and click Policies.
  12. Click New.
    1. In the General section:
      1. Display Name: Enter the name of the policy
      2. Check Enabled
      3. Category: Select Applications
      4. Trigger: Check Enrollment Complete and Recurring Check-in
    2. In the Packages section, click Configure.
      1. Select the package previously created.
      2. Distribution Point: Select Each computer's default distribution point
      3. Action: Select Install
    3. In the Scripts section, click Configure.
      1. Select the script previously created.
      2. Priority: Select After
      3. In the Scope tab, target the devices per your needs.
      4. In the Self-Service tab, check Make the policy available in Self Service
      5. Self Service Display Name: Enter the name and a description of the package
      6. Button Name: You can also add in an icon
  13. Click Save.

Enrolled Devices

If the device has already had the HP Insights macOs Agent installed and the user would like to toggle hiding the menu bar application, the user can proceed by running the ShowTray.sh or HideTray.sh scripts in the console. The process will be the same as listed above with "Devices that Have not Been Enrolled"; however, when entering the scripts, input sudo bash ./ShowTray.sh or sudo bash ./HideTray.sh respectively.

When using ShowTray.sh or HideTray.sh, providing the PIN is not necessary.

Contact Us

For any assistance, create a support case or email [email protected].