Deployment via NinjaOne MDM
This guide covers deploying the DefensX Agent to macOS devices managed by NinjaOne. The process uses shared scripts applicable to all customers, plus separate configuration profiles for the CA certificate, DNS Proxy extension, and customer-specific deployment settings.
|
Tip
|
Steps 2–4 are customer-agnostic and only need to be set up once. To deploy to a new customer or deployment, only repeat Step 5 with the corresponding mobileconfig file. For new devices under an existing customer, simply update the policy assignments in Step 5. |
Step 1: Download Required Files
Log in to the DefensX backend and navigate to Policies & Groups. Under the Deployments section, locate your deployment and click the RMM button.
In the RMM dialog, click Mac MDM and download the following files:
| File | How to Download |
|---|---|
|
Click Download Installer Script |
|
Click Download DefensX-CA Certificate → As mobileconfig |
|
Click DNS Proxy Extension mobileconfig |
|
Click Download mobileconfig |
|
Click Download Uninstaller Script |
Keep all files available, they are needed in the steps below.
Step 2: Add the Installer Script
-
Navigate to Administration → Library → Automation and click + Add automation, then select New Script.
-
Enter
DefensX Mac Installerin the Name field. -
Set Language to
ShellScript. -
Set Operating System to
Mac. -
Set Architecture to
x64 (64 bit). ARM64 devices are also supported despite the lack of an explicit ARM64 option. -
Set Run as to
System. -
Open
DefensX-installer.shin a text editor and paste its contents into the script field.
-
Click Save.
Step 3: Create the CA Certificate Configuration Profile
This profile deploys the DefensX Root CA certificate to managed devices.
-
Navigate to Administration → Policies → Agent policies and click the policy associated with the target customer.
-
Click MDM → Custom payload, then click + Add payload.
-
Enter
DefensX CA Certificatein the Name field. -
Click Upload file and select
DefensX-CA.mobileconfig. -
Click Add to continue.
Step 4: Create the DNS Proxy Extension Configuration Profile
This profile grants the DefensX DNS Proxy Network Extension the permissions it needs to operate without prompting users for approval. It enables DNS policy enforcement without modifying system-level DNS settings.
-
Still in the MDM → Custom payload section, click + Add payload.
-
Enter
DefensX DNSProxy Extensionin the Name field. -
Click Upload file and select
DefensX-DNSProxy-Extension.mobileconfig. -
Click Add to continue.
Step 5: Create the Customer-Specific Configuration Profile
This profile delivers the unique deployment key and browser settings for a specific customer. Each DefensX deployment has its own mobileconfig file containing the relevant Deployment Key.
-
Still in the MDM → Custom payload section, click + Add payload.
-
Enter a name that identifies the customer and deployment in the Name field, e.g.
DefensX [Customer Name] Default Settings. -
Click Upload file and select the
DefensX-[deployment].mobileconfigfile downloaded in Step 1. -
Click Add to continue.
At this point, you should have all three profiles configured as shown below.
Before clicking Save, attach the installer script to the policy as a scheduled automation:
-
Click Scheduled Automations → Add a Scheduled Automation, then click Add next to Automations.
-
Search for
DefensXand selectDefensX Mac Installercreated in Step 2.
-
Set Run as to
Systemand click Apply. -
Enter
DefensX Installerin the Name field. -
Select a scheduling frequency, e.g. Every 5 minutes, then click Add.
-
Click Save to complete the policy configuration. The agent will be installed based on the configured schedule.
|
Tip
|
It is safe to use short intervals for the installer script, if the DefensX Agent is already installed, the script exits immediately without taking any action. If the installer has not yet run but the configuration profiles are already received, users may see a DefensX login screen in their browser; once the agent installs, the extension authenticates silently without any user interaction. For more granular control over script execution, NinjaOne also supports Conditions and Compound Conditions. |
Uninstalling DefensX
First, add the uninstaller script to the automation library:
-
Navigate to Administration → Library → Automation and click + Add automation, then select New Script.
-
Enter
DefensX Mac Uninstallerin the Name field. -
Set Language to
ShellScript, Operating System toMac, Architecture tox64 (64 bit), and Run as toSystem. -
Open
DefensX-uninstaller.shin a text editor and paste its contents into the script field. -
Click Save.
Then, update the policy to remove the existing assignments and add the uninstall automation:
-
Navigate to Administration → Policies → Agent policies and click the policy associated with the target customer.
-
Click MDM → Custom payload and remove all three DefensX profiles (CA Certificate, DNS Proxy Extension, and the customer-specific profile).
-
Click Scheduled Automations and delete the
DefensX Installerentry. -
Click Add a Scheduled Automation, then click Add and search for
DefensX Mac Uninstaller. -
Enter
DefensX Uninstallerin the Name field. -
Select a scheduling frequency, e.g. Every 5 minutes, then click Add.
-
Click Save to complete the uninstall policy configuration.