Introduction
This article covers how to enroll and deploy HP Insights Agent on macOS devices with company-wide PIN. The process is as follows:
- Download the latest HP Insights macOS application from HP WXP.
- Select the script that configures the Mac Script Editor application based on preferences.
- Obtain a company PIN from WXP.
- From the left menu of the platform, click Settings > Preferences tab > Company PIN and copy the pin.
- Configure the HP Insights macOS Agent.
Select a Script to Configure the Mac Script Editor Application
After downloading the latest HP Insights macOS application, copy and save the necessary script to configure the Script Editor application based on preferences. When editing the scripts, ensure to change the "PIN=" to the company PIN.
- Enrollment.sh: Shows the menu bar and enrolls devices without user interaction (Update the CPIN within the script)
- Enrollment_Tray.sh: Hides the menu bar and enrolls devices without user interaction (Update the CPIN within the script)
- ShowTray.sh: Shows the menu bar; for devices that have already enrolled in the HP Insights Agent and auto-upgraded to macOS version 2.23.6 (and later)
- HideTray.sh: Hides the menu bar; for devices that have already enrolled in the HP Insights Agent and auto-upgraded to macOS version 2.23.6 (and later)
If the device is already enrolled, refer to the Enrolled Devices section below.
Enrollment.sh script
#!/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
#!/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
Obtain a Company-Wide PIN
To obtain the company PIN, log in to https://workforceexperience.hp.com. From the left menu, click Settings > Preferences.
For HP Partners, accept the partner invitation, and login to WXP. Click Customers > Companies > Company Details > Preferences.
Configure the macOS Application
Configuring the HP Insights macOS Agent depends on whether or not a device is enrolled. Instructions for both are as follows:
Unenrolled devices
- After the HP Insights macOS Application is downloaded, open the Script Editor application and copy one of the scripts above. Ensure to replace the 'PIN' with the actual company PIN and run the selected script.
- The selected script must be executed before the macOS Application installation
- After the selected script is executed, open the HPInsightsInstaller.pkg to install the HP Insights macOS Agent. Once installed, enrollment automatically begins
- On the Status bar, click the HP icon, and select Enroll this Device.
- From the platform window, click Enroll to proceed.
- Select Company if the device is owned by a company or Personal if the device is owned by an individual, then click Next.
- If Personal is chosen, some functionality may be disabled.
- Enter the company PIN, then click Next.
- When the enrollment confirmation window appears, click Yes to authorize company-owned computers. For individually owned computers, click either Yes or No depending on company policies
- A confirmation window appears, and Device Is Enrolled is displayed If the computer is successfully enrolled. Remember, computers must be connected to the Internet during enrollment
- Click Details for more information about the enrollment.
Enrolled devices
If the user has already installed the HP Insights macOS agent and wants to toggle hiding the menu bar application, the user can proceed by running the ShowTray.sh
or HideTray.sh
scripts in the console.
- While in the Script Editor application, input either
sudo bash ./ShowTray.sh
orsudo bash ./HideTray.sh
. - Once entering the desired script, the user will be prompted to enter the PIN for PIV Authentication.
After entering the PIN, the device will successfully run the script to either show or hide the menu bar.
Contact Us
For any assistance, create a support case or email [email protected]
.