Deploy Device Protection with NinjaOne
Use NinjaOne to deploy Aikido Device Protection across your managed Windows fleet with the required permissions in place.
All devices must be enrolled in NinjaOne before you begin.
Installation
What you'll need
Before starting, make sure you have the following from the Aikido Device Protection dashboard:
Your PowerShell install command (copied from the user group selector on the dashboard, includes token + installer download)
If you're missing it, go back to the Aikido Device Protection dashboard, click Connect Device.
Run the install command on managed devices
In the NinjaOne Admin Portal, go to Administration → Library → Automation.
Click Add automation → Add new script.
Configure the script:
Name: Aikido Device Protection installer
Language: PowerShell
Operating System: Windows
Architecture: All
Run as: System
Paste the PowerShell install command from the Aikido Device Protection dashboard into the editor and click Save.
In the left navigation, go to Devices, then filter by OS to show only Windows devices.
Select the target devices, then click Run in the toolbar, choose Script, and select Aikido Device Protection installer.
Confirm Run As is set to System, then click Run.
You can also schedule this script under Policies → Scheduled Automations to cover devices that come online later.
Apply the lockdown policy
Protect the Aikido service against tampering using NinjaOne's policy conditions. For uninstall prevention, use AppLocker outside NinjaOne.
In the NinjaOne Admin Portal, go to Administration → Policies.
Select (or create) the Windows policy assigned to your target devices.
Open the Conditions tab and click Add a condition.
Choose Windows Service (Windows) and configure:
Service:
EndpointProtectionState: Stopped
Under the condition's Automation, add a script action that restarts
EndpointProtection(for example, a PowerShell one-linerStart-Service EndpointProtectionset to Run as: System).Save the policy.
Block uninstallation of the Aikido Device Protection app
Create a NinjaOne automation script that applies the AppLocker policy via PowerShell:
In the NinjaOne Admin Portal, go to Administration → Library → Automation and click Add automation → Add new script.
Set Language to PowerShell, Operating System to Windows, and Run as to System.
Paste the following script and click Save:
$tmp = "$env:TEMP\aikido-applocker.xml"
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/AikidoSec/safechain-internals/refs/heads/main/docs/aikido-applocker-deny-mdm.xml" -OutFile $tmp
Set-AppLockerPolicy -XmlPolicy $tmp -Merge
Remove-Item $tmp -ForceRun the script against your target Windows devices from the Devices tab.
Reboot devices after installation
In the NinjaOne Admin Portal, open Devices and select your target Windows devices.
Click Run in the toolbar and choose Reboot. Select Later to schedule a restart, or Now for an immediate restart.
Pick a date, time, and time zone, then click Set.
The agent fully activates on the next boot.
Troubleshooting
Device doesn't appear in the dashboard after the script runs
Reboot the device; the agent fully registers on the next boot
Script exits with an error in the MDM console
Run the script manually as SYSTEM on a test host to see the full error; confirm the device has internet access to download the installer
Agent service is not running
Reboot the device; if the service is still absent, re-run the install script
Script is blocked by execution policy
Scripts run via MDM execute as SYSTEM and bypass user-level execution policy restrictions; confirm the MDM is not applying an additional policy that restricts script execution
Device shows as inactive after installation
The agent needs a reboot to fully activate; check back after rebooting
Last updated
Was this helpful?