In this task, you will prepare a script that creates an AgentP configuration file on the managed device.
-
In the left-hand menu, select the Devices option.
-
In the left-hand menu of the Devices pane, select the macOS option in
the By platform section.
-
In the left-hand menu of the macOS | macOS devices pane, select the Shell
scripts option in the macOS policies section.
-
In the macOS | Shell scripts pane, click on the Add button.
-
In the Basics step of the Add script wizard, in the
Name field, type a name for this profile, optionally fill in the
Description field, and click on the Next button.
In this example, we used the name Portnox AgentP Configuration, but you can use any
name you like.
-
In a text editor, prepare a script according to the instructions below.
When finished, save your script on the local disk with a .sh extension, for example,
agentp_config.sh.
Adjust your script to your environment and requirements (see: AgentP configuration/installation options).
#!/bin/sh
mkdir -p /var/agentp
json='{"HideUI":true}'
echo $json > /var/agentp/uipreferences.cfg
json='{"Mode":"certificate","Certificate":"issuer:issued_to","AutoSwitch":true,"UseCertificateSerialNumberAsDeviceId":true,"Domain":"your_domain","profileInstallationNeeded":false}'
echo $json > /var/agentp/unattended.cfg
chmod a+rw /var/agentp
chmod a+rw /var/agentp/uipreferences.cfg
chmod a+rw /var/agentp/unattended.cfg
-
As issued_to, paste the value that you copied earlier from the Portnox Cloud
portal.
For example:
json='{"Mode":"certificate","Certificate":"issuer:Vorlon - Portnox CLEAR","AutoSwitch":true,"UseCertificateSerialNumberAsDeviceId":true,"Domain":"your_domain","profileInstallationNeeded":false}'
-
As your_domain, use the domain serviced by Portnox Cloud (the domain configured in your
authentication repository integration).
For example:
json='{"Mode":"certificate","Certificate":"issuer:Vorlon - Portnox CLEAR","AutoSwitch":true,"UseCertificateSerialNumberAsDeviceId":true,"Domain":"vorlon.com","profileInstallationNeeded":false}'
-
In the Script settings step of the Add script wizard:
-
Click on the 🗀 icon to open the script that you saved in the
previous step.
Note: The script will be visible in the text box below, but it is not editable in the box. If you need to
make changes, you must make the changes in the text file and load the script in Intune again.
-
In the Run script as signed-in user field, select the No
option to run the script as the root user.
-
In the Hide script notifications on devices field, select the
Yes option to make the configuration silent for users.
-
In the Script frequency field, keep the default Not
configured value to run the script only once.
-
In the Max number of times to retry if script fails field, keep the default
Not configured value.
-
Click on the Next button.
-
In the Assignments step of the wizard, use relevant options to assign this profile to
specific groups or all users/devices, and then click on the Next button.
-
In the Review + create step of the wizard, review all the information, and then click on the
Add button.
Result: When onboarding a macOS device, Intune will obtain a SCEP certificate and install AgentP with the
configuration delivered by the script, which disables AgentP certificate management and leaves only the risk assessment
functionality running.