NinjaOne
Deploy Device Protection with NinjaOne on Windows.
Use NinjaOne to deploy Device Protection across your managed Windows fleet with the required permissions in place.
All devices must be enrolled in NinjaOne before you begin.
#Set up the deployment
#Check you have the files
Before starting, make sure you have the following from the Noon 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 Noon dashboard and 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: Device Protection installer
- Language: PowerShell
- Operating System: Windows
- Architecture: All
- Run as: System
- Paste the PowerShell install command from the Noon 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 click 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 Device Protection service against tampering using NinjaOne's policy conditions, then block uninstalls with an AppLocker script.
- 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:
EndpointProtection - State: Stopped
- Service:
- 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 uninstall with AppLocker
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 -Force- Run 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. Click Later to schedule a restart, or Now for an immediate restart.
- Pick a date, time, and time zone, then click Set.
Device Protection fully activates on the next boot.
#Troubleshooting
On the device, Device Protection appears as Aikido Endpoint Protection.
| Problem | Fix |
|---|---|
| Device doesn't appear in the dashboard after the script runs | Reboot the device; Device Protection 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 |
| The Device Protection 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 | Device Protection needs a reboot to fully activate; check back after rebooting |