Alongside Windows devices, Microsoft Intune also allows you to manage and deploy software to macOS devices.
In this article, we’ll explain how to use Microsoft Intune to deploy the PaperCut Pocket or PaperCut Hive client software to managed MacOS devices.
At a high level:
- PaperCut provides the PaperCut Hive client software as a .zip file that contains multiple components.
- Microsoft Intune deploys the .zip file to macOS computers using a shell script.
- You modify an installation script to include your PaperCut Hive tenancy information.
- Microsoft Intune downloads and extracts the .zip file to
/var/tmp/
and runs the script on macOS computers.
Prerequisites
- Microsoft Intune
- macOS 12.0 or later devices managed by Microsoft Intune
- Cloud storage, to host the PaperCut Pocket or PaperCut Hive installation zip file.
- You need to be a Microsoft Intune administrator (or have relevant permissions), and macOS devices should have already been enrolled and set up for Microsoft Intune management.
- Rosetta 2 is required to run the PaperCut Pocket or PaperCut Hive client software on Apple Silicon Macs. To install Rosetta 2 on Apple Silicon Macs automatically, you can deploy a shell script in Intune. To view a sample script, see Rosetta 2 Installation Script .
Steps
To deploy the PaperCut Hive client software using Microsoft Intune:
- Download the PaperCut Hive installation zip file and host it on your chosen cloud storage location
- Create a shell script in Microsoft Intune to install the PaperCut Pocket or PaperCut Hive client software.
- Test your deployment
Deploy the PaperCut Pocket or Hive software to end-user devices
You need to download the macOS PaperCut Pocket or PaperCut Hive client software ZIP and upload it to your preferred cloud storage location, then create a Microsoft Intune shell script to deploy it.
1. Uploading the PaperCut Pocket or PaperCut Hive computer app to your preferred cloud storage location.
In the admin interface, the PaperCut Pocket or PaperCut Hive client software files can be downloaded from the Jamf Pro Add-on.
- From the PaperCut Pocket or Hive admin console, in the left menu, select Add-ons.
- Select the All Add-ons tab.
- Locate the Jamf Pro card and click Learn More.
- Click Add to enable this add-on for your organization.
- Next, click on the Setup instructions tab.
- Click the Download zip file button to download the PaperCut Pocket or PaperCut Hive client software zip file to your computer.
- Upload the papercut-pocket.zip or papercut-hive.zip to your preferred cloud storage. Take a copy of the download URL. Note, this URL should provide a direct download of the installer zip.
- Close the Jamf Pro add-on instructions window.
- In the PaperCut Hive admin interface, go to Manage > Edge Mesh and click Add edge nodes.
- Select Manually deploy edge nodes.
- Under Step 2, click the Copy button to copy the command line and paste it into a text editor. You’ll need the
/systemkey
value later.
2. Create a shell script in the Intune admin console
For deploying the PaperCut Pocket or PaperCut Hive client software to managed-macOS devices we will use a shell script. https://learn.microsoft.com/en-us/mem/intune/apps/macos-shell-scripts
- Copy the below script relevant to your product, and save this as a
.sh
file on your computer.
PaperCut Hive
#!/usr/bin/env zsh
# Download the PaperCut Hive installer zip file from your chosen cloud storage location.
cd /var/tmp
curl "https://your-cloud-storage-location/temp/papercut-hive.zip" -O -J -L
unzip papercut-hive.zip
# Create a variable specifying the unzip location (default: var/tmp)
HIVE_INSTALLER_PATH="/var/tmp/hive_installer"
# Get the current logged in user excluding loginwindow, _mbsetupuser, and root
current_user=$(/usr/sbin/scutil <<<"show State:/Users/ConsoleUser" |
/usr/bin/awk '/Name :/ && ! /loginwindow/ && ! /root/ && ! /_mbsetupuser/ { print $3 }' |
/usr/bin/awk -F '@' '{print $1}')
# Make sure that we can find the most recent logged-in user
if [[ $current_user == "" ]]; then
# Because someone other than the current user was returned, we are going to look at
# who uses this Mac the most, then set the current user to that user.
current_user=$(/usr/sbin/ac -p | /usr/bin/sort -nk 2 |
/usr/bin/grep -E -v "total|admin|root|mbsetup|adobe" | /usr/bin/tail -1 |
/usr/bin/xargs | /usr/bin/cut -d " " -f1)
fi
# Install the PaperCut Hive software with system administrator privileges
# This code is private to your PaperCut organisation. Please do not share it
# Replace 'yy' with the regional data centre region code e.g. au,us,eu,uk
# Replace 'zz' with the OrgID
cd ${HIVE_INSTALLER_PATH}
./install.sh xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy zz
# Install the PaperCut client as the current user
/usr/sbin/chown -R $current_user ${HIVE_INSTALLER_PATH}
/usr/bin/su - "$current_user" -c "cd ${HIVE_INSTALLER_PATH} && ./install.sh install_client"
# Remote installation files
rm -d -r /var/tmp/hive_installer
sudo rm /var/tmp/papercut-hive.zip
PaperCut Pocket
#!/usr/bin/env zsh
# Download the PaperCut Pocket installer zip file from your chosen cloud storage location.
cd /var/tmp
curl "https://your-cloud-storage-location/temp/papercut-pocket.zip" -O -J -L
unzip papercut-pocket.zip
# Create a variable specifying the unzip location (default: var/tmp)
POCKET_INSTALLER_PATH="/var/tmp/pocket_installer"
# Get the current logged in user excluding loginwindow, _mbsetupuser, and root
current_user=$(/usr/sbin/scutil <<<"show State:/Users/ConsoleUser" |
/usr/bin/awk '/Name :/ && ! /loginwindow/ && ! /root/ && ! /_mbsetupuser/ { print $3 }' |
/usr/bin/awk -F '@' '{print $1}')
# Make sure that we can find the most recent logged-in user
if [[ $current_user == "" ]]; then
# Because someone other than the current user was returned, we are going to look at
# who uses this Mac the most, then set the current user to that user.
current_user=$(/usr/sbin/ac -p | /usr/bin/sort -nk 2 |
/usr/bin/grep -E -v "total|admin|root|mbsetup|adobe" | /usr/bin/tail -1 |
/usr/bin/xargs | /usr/bin/cut -d " " -f1)
fi
# Install the PaperCut Pocket software with system administrator privileges
# This code is private to your PaperCut organisation. Please do not share it
# Replace 'yy' with the regional data centre region code e.g. au,us,eu,uk
# Replace 'zz' with the OrgID
cd ${POCKET_INSTALLER_PATH}
./install.sh xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy zz
# Install the PaperCut client as the current user
/usr/sbin/chown -R $current_user ${POCKET_INSTALLER_PATH}
/usr/bin/su - "$current_user" -c "cd ${POCKET_INSTALLER_PATH} && ./install.sh install_client"
# Remote installation files
rm -d -r /var/tmp/pocket_installer
sudo rm /var/tmp/papercut-pocket.zip
- Update the script with the identity of your PaperCut Pocket or PaperCut Hive tenancy.
- Update the download URL,
https://your-cloud-storage-location/temp/papercut-hive.zip
orhttps://your-cloud-storage-location/temp/papercut-pocket.zip
, to point to your cloud storage location. - Replace
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
with the value of your organization’s/systemkey
you noted down earlier. - Replace
yy
with the regional hosting location of your tenancy. For example,au
,us
,uk
,eu
.
- Update the download URL,
- Sign in to your Intune admin interface, for example, https://intune.microsoft.com .
- In the left-hand menu, select Devices.
- In the sub-menu, select macOS.
- From the left-hand menu, select Shell scripts
- Select Add.
- Enter a name for your script. For example, PaperCut Hive Client Software Deployment.
- Upload the
.sh
script we created in step 1. - Set Run script as signed-in user to No.
- Set Hide script notifications on devices to Yes.
- Leave Script frequency as Not configured.
- Set Max number of times to retry if script fails to 1 time.
- Under the Assignments section, apply your selection of groups or users for which this script should apply.
- Review your configuration and save the script.
3. Confirm successful execution of the script
Alongside the logging available in the Intune admin interface, which shows the script’s successful execution, we can manually check three areas on a sample workstation.
- In the PaperCut Pocket or PaperCut Hive admin interface, confirm that the device is listed in the Edge Mesh tab and is showing as online.
- Open System Settings > Printers & Scanners (for macOS 13 Ventura or newer) or System Preferences > Printers & Scanners (for macOS 12 Monterey or earlier). Confirm that the PaperCut Printer is displayed.
- Open the PaperCut Pocket or PaperCut Hive invite email for the user and click on the link in that email. This will cause the PaperCut Pocket or PaperCut Hive print client on that macOS device to be linked to that user.
- Send a test print job and validate it in your PaperCut Pocket or PaperCut Hive Admin dashboard. In the Job Log, you can see the job and if it is linked to the correct user.
Post-deployment
Spot-check a few macOS computers to ensure the following:
- In Activity Monitor, check the
pc-edgenode-service
process is running.
The computer requires this service to perform Edge Mesh activities such as receiving, replicating, or printing jobs if the PaperCut Cloud Service calls upon it. - In Activity Monitor, check that
pc-print-client
process is running.
This is the print client needed to link the end-user to PaperCut Pocket or PaperCut Hive and submit jobs via the PaperCut Printer. This process must be running in memory. It provides the functions the user needs to print jobs via the PaperCut Printer.
If either of these are not running, please get in touch with your PaperCut reseller and provide copies of the logs.
Locations of logs
-
edge node logs - The Setup Log for the edge node service:
/Library/PaperCut Hive/data/logs
or/Library/PaperCut Pocket/data/logs
directoryEdge node Setup Log: “Setup Log %date% 00X.txt”
-
print client logs - The print client logs are located in the:
~/Library/PaperCut Hive/data/logs
or~/Library/PaperCut Pocket/data/logs
directory
Note: For macOS, since the print client is installed under the user context, you’ll need to perform either the below steps to grab this set of logs:
- Open Finder.
- Hold the Option key when clicking the Go menu.
- Library will appear below the current user’s home directory
Or
- Open Finder.
- Click on the Go menu and choose Go to Folder.
- In the Go To Folder dialog box, type ~/Library
- Click Go
Comments