Installing PDQ Connect Agent on macOS using SimpleMDM
SimpleMDM is an Apple mobile device management (MDM) solution that is part of the PDQ family of products. This article provides multiple tutorials on deploying the PDQ Connect macOS agent using SimpleMDM to automate the installation process.
Silently deploy with SimpleMDM's Munki integration
This install option may be preferable for automating the installation of the PDQ Connect agent while using Automated Enrollment and the SimpleMDM Munki integration.
- Download the PDQ Connect Agent installer package (.pkg) from your PDQ Connect account and copy the license key.
- In SimpleMDM, go to Apps & Media > Catalog.
- Click "Add app" and select "Custom app".
- Drag and drop or use the file browser to upload the PDQ Connect Agent package (ex. PDQConnectAgent-5.6.27.pkg). The upload will take a moment to process.
- Go to Apps & Media > Catalog and click the app name, then select the "Munki" tab.
Under the "Munki" tab, look under the Scripts section. Locate the "Before Install" option and add the following script:
#!/bin/bash # Define token REGISTRATION_TOKEN="{{YOUR_TOKEN_HERE}}" # Define the file path TOKEN_FILE="/Library/Application Support/PDQConnectAgent/token" # Ensure the directory exists mkdir -p "$(dirname "$TOKEN_FILE")" # Check if the token file exists; if not, create it if [ ! -f "$TOKEN_FILE" ]; then touch "$TOKEN_FILE" fi # Write the REGISTRATION_TOKEN to the token file echo "$REGISTRATION_TOKEN" > "$TOKEN_FILE"Replace the {{YOUR_TOKEN_HERE}} variable with the token copied from your account.
In the "After Install" text box, enter the following script:
#!/bin/bash echo "{{YOUR_TOKEN_HERE}}" > /Library/Application\ Support/PDQConnectAgent/tokenReplace the {{YOUR_TOKEN_HERE}} variable with the license key copied from your account when downloading the PDQ Connect agent installer.
- Click "Save" after adding the scripts.
- Once it has finished processing, assign the app to a group with Install Method set to "Munki" and Install Type set to "Managed".
- Alternatively, if you wish to allow users to optionally install/uninstall the agent, you can select another install method.
Deploy the agent using a script in SimpleMDM
This install option may be preferable if your devices are already enrolled in SimpleMDM and/or you are not using the SimpleMDM Munki integration.
- In PDQ Connect, copy the macOS Installation Script from your account.
- In SimpleMDM, go to the Scripts section and click "Create Script".
- Give the script a name.
- In the "Script" text editor, add a hashbang on the first line:
#!/bin/bash - On the second line, paste the script copied from your PDQ Connect account.
- Save the script.
- Navigate to Scripts > Jobs and click "Create Job".
- In the Script field, select the script you just created.
- In the "Run On" field, select the devices or groups you want to run to install the agent on.
- Fill out the remaining settings as needed.
- Once finished, click "Create". The script job will run at the selected time and install the agent. The user may be prompted to enter an admin password.