Intune Remediations allow you to deploy detection scripts to Windows devices. For OpenClaw detection, only a detection script is needed (no remediation script).
- Navigate to Devices > Manage devices > Scripts and remediations
- Click Create script package
- Name: OpenClaw Detection
- Detection script: Upload the PowerShell script below
- Remediation script: Leave empty (detection only)
- Run script in 64-bit PowerShell: Yes
- Run this script using the logged-on credentials: No (runs as SYSTEM)
Save as detect-openclaw.ps1:
iwr -useb https://raw.githubusercontent.com/knostic/openclaw-detect/refs/heads/main/detect-openclaw.ps1 | iexOr embed the full script directly for offline execution.
| Exit Code | Intune Status | Meaning |
|---|---|---|
| 0 | Compliant | OpenClaw not installed |
| 1 | Non-compliant | OpenClaw detected |
| 2 | Error | Script failed |
- Click Assignments
- Add device groups to target
- Set schedule (default: every 8 hours)
- Navigate to Devices > Manage devices > Scripts and remediations
- Select OpenClaw Detection
- View Device status for per-device results
- Filter by Detection status: With issues to find devices with OpenClaw