Intune on Windows
Deploy the standalone DefenseClaw enterprise profile to Windows x64 with a Microsoft Intune Win32 app, keep it healthy with Remediations, deliver the AI Defense key, change the config and remove it.
Validation
You upload a base Win32 app, Install-DefenseClawIntune.intunewin, that
New-DefenseClawIntunePackage.ps1 builds from
DefenseClawSetup-Enterprise-Standalone-x64.exe and your config.yaml, a PowerShell 7
Win32 app it depends on, and, if the config names a custom rule pack, a rule-pack app.
The app runs Install-DefenseClawIntune.ps1 as System, which runs Setup /ensure.
Detection is the registry value ProductVersion under
HKEY_LOCAL_MACHINE\SOFTWARE\Cisco\DefenseClaw\Enterprise, greater than or equal to
the version you deploy. Uninstall runs Install-DefenseClawIntune.ps1 -Uninstall.
This recipe follows the MDM contract; read it first for exit codes, detection and logs. Packager parameters, Remediations details and the troubleshooting table are lower on this page.
Before you start
- Tenant: licences, automatic enrollment and device groups are in place (Prepare your Intune tenant).
- Devices: Windows 10 or 11 x64 enrolled in Intune. ARM64 and 32-bit are refused; Intune cannot enroll Windows Server.
- WDAC/AppLocker: allow or sign the DefenseClaw launcher, detection and
Remediations scripts so they run in
FullLanguage. - Release: download the Setup, verify
checksums.txtwith cosign and read its SHA-256 pin (What you deliver). - Config: write
config.yaml(Settings), without the AI Defense key. Setai_discovery.enabled: trueif you expectagent ide-pluginsto report installed AI extensions. - Workstation: PowerShell 7.4 or later and Microsoft's
IntuneWinAppUtil.exe. - Remediations (optional) need Windows Enterprise E3 or E5, Education A3 or A5, or Windows VDA per-user licenses.
1. Add PowerShell 7 as a Win32 app
The lifecycle runs only in PowerShell 7 from Microsoft's x64 MSI. Wrap the MSI with
IntuneWinAppUtil.exe and add it in Apps > All Apps > Create >
Windows app (Win32):
| Setting | Value |
|---|---|
| Install command | msiexec /i PowerShell-7.x.y-win-x64.msi /qn ADD_PATH=1 USE_MU=1 ENABLE_MU=1 |
| Uninstall command | msiexec /x {product-code} /qn |
| Install behavior | System |
| Detection rule | File. Path C:\Program Files\PowerShell\7, file pwsh.exe, String (version), Greater than or equal to 7.4.0, 32-bit app on 64-bit clients: No |
2. Build the Win32 app content
On the workstation, in PowerShell 7:
./New-DefenseClawIntunePackage.ps1 `
-SetupPath .\DefenseClawSetup-Enterprise-Standalone-x64.exe `
-Sha256 '<SHA-256 of the Setup from checksums.txt>' `
-ConfigPath .\config.yaml `
-OutputDirectory .\intune-defenseclaw-<version> `
-IntuneWinAppUtil C:\Tools\IntuneWinAppUtil.exe `
-ProductVersion X.Y.ZThe script verifies the Setup against the pin, writes content\ (the Setup,
config.yaml, Install-DefenseClawIntune.ps1 and intune-package.json with the
SHA-256 pins), wraps it into Install-DefenseClawIntune.intunewin and prints the
values to enter in the admin center. It requires a config_version: 9 config. All
parameters: Packager parameters.
If the config selects a custom rule pack, deliver it first with a rule-pack app and make that app a dependency of the install (Custom rule pack app).
Packager parameters
| Parameter | Meaning |
|---|---|
-SetupPath | The Setup. Required. |
-Sha256 | The Setup's pin. Required with hash-pinned trust; the script refuses a Setup that does not match. |
-TrustMode | HashPinned (default) or Authenticode. |
-AllowedSigners | With Authenticode: SHA-256 thumbprints of accepted signer certificates, comma-separated or repeated. |
-ConfigPath | The config. Without one the first install fails with 1639. With -BundlePath it builds the single app described below. Leave it out of an upgrade without -BundlePath for a device in bundle mode, which refuses it with bundle_required. |
-BundlePath | A signed policy bundle (.dcbundle). With -ConfigPath: the single app. Alone: a bundle-only app for devices installed with a base app, which needs -BaseConfigPath. Both need -RequireBundle. |
-BaseConfigPath | With -BundlePath alone: the config of the base app. The packager refuses it unless its guardrail: block is the bundle's, apart from custom_packs.<pack>.path, and its claude_code:, codex:, connector_hooks: and application_protection: blocks are the bundle's or absent from both. No other setting is compared. |
-TrustAnchorPath | With -BundlePath: the bundle trust anchor file to install. |
-RequireBundle | With -BundlePath: the bundle version or id the generated detect-bundle.ps1 requires. |
-OutputDirectory | Where to write. Required. Its content folder must not exist yet. |
-IntuneWinAppUtil | Path to IntuneWinAppUtil.exe. When set, the script also builds the .intunewin. |
-ProductVersion | The release version. The script prints it in the detection rule and records it. |
The packager requires a config_version: 9 config and refuses an inline
api_key. The base config must be plain ASCII with LF or CRLF line endings (no
tab, lone CR or non-ASCII byte, even in a comment; one UTF-8 byte order mark is
allowed). It also refuses a top-level key that is not plain lowercase (a tag,
anchor, escape or ? key) and a quoted value or {...} or [...] that
continues on the next line.
With -ConfigPath, -BundlePath, -TrustAnchorPath and -RequireBundle
the packager builds one app (the single app). Its install command runs Setup
/ensure CONFIG= BUNDLE= TRUSTANCHORS=:
- On a device without DefenseClaw, Setup installs from
config.yamlwith every service stopped and disabled, then applies the bundle, starts the services on it and confirms it. No service runs onconfig.yaml, and until the bundle applies a DefenseClaw hook refuses the call. - If the bundle is not applied, Setup removes that install and the app fails
(
1603), so Intune retries the whole app. - On an installed device the app applies the bundle only. Deliver a later bundle version as a new version of the same app; it has no dependency on another DefenseClaw app.
Use the generated detect-bundle.ps1 as its detection rule. Devices installed
with a base app and a bundle app take the single app as it is: assign it, then
remove the two earlier assignments.
With -BundlePath alone (a bundle-only app for those devices until they move),
the -BaseConfigPath row above lists the blocks the packager compares. Copy
other enforcement settings, such as asset_policy:, into the base config too if
they must apply before the bundle app runs.
The script verifies the Setup against -Sha256 (and, for Authenticode, its
signer); writes content\ with the Setup, config.yaml,
Install-DefenseClawIntune.ps1 and intune-package.json (the SHA-256 pins
setup_sha256 and config_sha256, the trust mode and the allowed signers); wraps
content\ into Install-DefenseClawIntune.intunewin; and prints the values to
enter in the admin center.
Custom rule pack app
The kit's Install-DefenseClawRulePack.ps1 and Detect-DefenseClawRulePack.ps1
are a reference rule-pack app. They are Windows PowerShell 5.1 scripts, so Intune
runs them as they are. The install script copies the pack folder to
C:\ProgramData\DefenseClaw-RulePacks\<pack> (or -PacksRoot), then sets what
Setup checks:
- on the parent folder: owner Administrators, no inherited entries, Full control
for SYSTEM and Administrators, Read & execute for
NT SERVICE\DefenseClawGateway, noUsersorAuthenticated Usersentry; - on the pack and everything in it: the same entries, owner Administrators.
-PacksRoot must be a folder of its own, because the install replaces its owner
and permissions. The script refuses (1639) a drive root, a Windows, program,
profile or DefenseClaw folder such as C:\ProgramData or C:\Windows, an
existing non-empty folder it did not set up, and one that holds anything other
than rule pack folders. It writes a .defenseclaw-rule-packs file in the folder,
and also accepts a folder that already has the permissions above, for example one
set up by hand from the Windows guide.
The script sets the parent folder's permissions with Set-Acl, by SID. The app
runs before the base app, so the gateway service does not exist yet, and icacls
cannot grant its SID until it does (it fails with 1332). It then checks the
copy and the permissions of the pack, its parent and every folder above, and
exits 0. Run again, it changes nothing when everything is in place and repairs
only what differs; a changed pack is copied beside the old one and swapped in. It
exits 1603 with the problem when a check fails, and 1639 for invalid
arguments.
-
On the workstation, put the reviewed pack folder (its name is the
guardrail.custom_packsname) next to the two scripts in a content folder, and print the pack's tree SHA-256 and the commands the install runs, without changing anything:.\Install-DefenseClawRulePack.ps1 -PackName my-pack -PlanOnly -
In your copy of
Detect-DefenseClawRulePack.ps1, set the defaults of$PackNameand$ExpectedTreeSha256(and$PacksRootif you changed it). Intune runs detection scripts without arguments. -
Wrap the content folder with
IntuneWinAppUtil.exe(setup fileInstall-DefenseClawRulePack.ps1) and create the Win32 app:
| Setting | Value |
|---|---|
| Install command | %SystemRoot%\Sysnative\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File .\Install-DefenseClawRulePack.ps1 -PackName my-pack -ExpectedTreeSha256 <tree sha256> |
| Uninstall command | The same with -Remove instead of -ExpectedTreeSha256 <tree sha256> |
| Install behavior | System |
| Return codes | Keep the defaults; 1603 and 1639 report Failed |
| Detection rules | Use a custom detection script: your Detect-DefenseClawRulePack.ps1, Run script as 32-bit process on 64-bit clients: No, Enforce script signature check and run script silently: No (or Yes after you sign the script) |
| Assignments | The same device groups as the base app; the base app's dependency installs it first |
The detection script reports the pack installed only when the folder has the
expected tree SHA-256, only SYSTEM and Administrators own and can change it and
its parent, no standard user can read them, and the gateway service can read
them. Otherwise Intune runs the install command again, which repairs it. The
pack's digest in the config (guardrail.custom_packs.<pack>.digest) still pins
its files for the gateway.
If you deliver the pack another way, for example a pinned HTTPS download, it needs
the same permissions. When the gateway cannot read the pack folder or its parent,
Setup refuses the base app with 1639 and prints an icacls fix that names
NT SERVICE\DefenseClawGateway. icacls cannot resolve that name before the
first install (1332), so on a new device set the parent folder from an elevated
prompt with Set-Acl, then retry the base app:
$Packs = 'C:\ProgramData\DefenseClaw-RulePacks'
$Acl = Get-Acl -LiteralPath $Packs
$Acl.SetSecurityDescriptorSddlForm('O:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;0x1200a9;;;S-1-5-80-1858176940-1394861675-2895326486-505287571-2610476274)', 'Owner, Access')
Set-Acl -LiteralPath $Packs -AclObject $Acl
icacls "$Packs\my-pack" /reset /T /C3. Create the Win32 app
Upload the .intunewin in Apps > All Apps > Create > Windows app (Win32):
| Step | Setting | Value |
|---|---|---|
| Program | Install command | %SystemRoot%\Sysnative\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File .\Install-DefenseClawIntune.ps1 |
| Program | Uninstall command | powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File .\Install-DefenseClawIntune.ps1 -Uninstall |
| Program | Install behavior | System |
| Program | Return codes | Keep the defaults. 1603 and 1639 then report as Failed; 1618 retries |
| Requirements | Architecture | x64 only |
| Detection rules | Rule | Registry. Key HKEY_LOCAL_MACHINE\SOFTWARE\Cisco\DefenseClaw\Enterprise, value ProductVersion, Version comparison, Greater than or equal to <version>, 32-bit app on 64-bit clients: No |
| Dependencies | App | The PowerShell 7 app, Automatically install: Yes |
| Assignments | Required | Device groups |
Why these values: below.
Why the Win32 app values are what they are
- The launcher. Setup refuses relative and environment-expanded paths, and
the Intune content folder is not known in advance.
Install-DefenseClawIntune.ps1re-checks the pins inintune-package.json, builds the absoluteCONFIG=path, runsDefenseClawSetup-Enterprise-Standalone-x64.exe /ensure JSON=1 CONFIG=...(addingALLOWEDSIGNERS=for Authenticode), prints the result document and exits with Setup's code. A tampered or incomplete package fails withmdm_hash_mismatchormdm_package_incomplete(1603). Sysnativestarts the 64-bit Windows PowerShell from the 32-bit Intune host, as Microsoft recommends for 64-bit installs.- The uninstall command names
powershell.exeand the launcher without a path, because Intune does not expand environment variables in uninstall commands. The launcher re-checks the Setup pin and runsDefenseClawSetup-Enterprise-Standalone-x64.exe /uninstall JSON=1(-PurgeaddsPURGE=1). Setup refuses an uninstall withuninstall_in_use, before it changes anything, while a program runs fromC:\Program Files\Cisco\DefenseClaw\bin(often an Intune detection or Remediations script that runs the installed CLI for a few seconds). With-Purge, Setup also refuses while a program has a file inC:\ProgramData\Cisco\DefenseClawopen, for example a SIEM forwarder readingruntime\audit.db. The launcher runs Setup again, at most 6 times, each after the named programs exit or 20 seconds pass. If Setup still refuses, the launcher exits1618, which Intune retries, and its result names each program, its process id and account. An app whose uninstall command is Setup itself fails such an uninstall with1603and is not retried. The kit's detection and Remediations scripts start no installed CLI while a lifecycle run holds the lock. - Version comparison, greater than or equal to. A newer installed version still counts as installed, so an older app never tries to replace it.
If you prefer a script, packaging/mdm/windows/detect.ps1 works as a custom
detection script. Intune runs detection scripts without arguments, so set the
default of $MinimumVersion in your copy's param() block to the app's version.
It reads the 64-bit registry view, so the Run script as 32-bit process on
64-bit clients setting does not matter.
4. Keep it healthy with Remediations
Add a Remediations package (Devices > Manage devices > Scripts and
remediations) with Remediate-Detect.ps1 and Remediate-Fix.ps1, run as SYSTEM,
daily. Detection runs enterprise windows verify; the fix runs
enterprise windows ensure, which repairs from the installed payload or does
nothing. A repair takes the gateway down for one to two minutes. Remediations cannot
install, upgrade or change the config. Settings and edge cases:
Remediations.
Remediations
A Remediations package re-checks the deployment on a schedule and repairs it from the installed payload. Create it in Devices > Manage devices > Scripts and remediations > Create script package:
| Setting | Value |
|---|---|
| Detection script file | Remediate-Detect.ps1 |
| Remediation script file | Remediate-Fix.ps1 |
| Run this script using the logged-on credentials | No (runs as SYSTEM) |
| Enforce script signature check | No, or Yes after you sign both scripts with a certificate in the devices' Trusted Publishers store. With Yes, the scripts run under the device's PowerShell execution policy (Windows clients default to Restricted, so set AllSigned or RemoteSigned) and must be saved as UTF-8 without a byte-order mark |
| Run script in 64-bit PowerShell | No (the default). The scripts work in either |
| Schedule | Daily, or Hourly every 4 to 8 hours |
If you assign the package with Microsoft Graph, read the assignment back: Graph can accept runRemediationScript: true and store false, and scheduled runs then only detect. When it reads false, turn on the remediation script for that assignment in the admin center. An on-demand run (Run remediation on the device) runs both scripts either way.
Remediate-Detect.ps1 runs the installed CLI's enterprise windows verify --profile standalone --json. It exits 0 on a healthy host, on a host without the deployment (installing is the Win32 app's job), and while another lifecycle run holds the lock. Otherwise it exits 1 and starts the remediation. Its one line names the failing check: each DefenseClaw service that is not running with its start mode, or else the first error.
Remediate-Fix.ps1 first checks the same way. When the only problem is a stopped or disabled hook guardian or enumerator while the gateway runs, it sets that service back to automatic start, starts it and verifies again without touching the gateway. Otherwise it runs enterprise windows ensure --profile standalone --json, which verifies and repairs from the installed payload, or does nothing. A repair stops every DefenseClaw service, so the gateway is down for one to two minutes and hooks fail closed meanwhile. It exits with the lifecycle's code. After an upgrade that a restart or power loss cut off, the installed (older) CLI rolls the change back: the line says repaired (recovered_pending_transaction): ensure rolled back an interrupted lifecycle change, names the release that runs again, and asks you to run the newer Setup /ensure again (the Win32 app retries it).
A first install can return 0 with coverage_complete: false. Setup cannot refuse an install over a vendor policy file it finds on the computer, because no deployment exists yet to judge it by. Left behind by a purge (a file Users can change in OpenCode's or Copilot's folder under C:\ProgramData) or put there by hand, such a file stays unprotected: the install finishes, and its result lists the file in a vendor_folder_not_held warning with the fix. The next Remediate-Detect.ps1 run catches it, because enterprise windows verify fails with 1603. Apply the fix named in the message, then the next ensure covers the connector.
Until an administrator runs that fix, every Remediations cycle repeats: Remediate-Detect.ps1 fails, Remediate-Fix.ps1 runs enterprise windows ensure, which stops with 1603 before it changes anything (and writes one more managed_vendor_folder_not_protected alert row), and the device stays reported as not healthy. The cycle follows the schedule you set; nothing retries faster. A file owned by a standard account is the exception: the same ensure moves it aside and the next cycle passes.
Both scripts print one short line, because Intune keeps 2,048 characters of output. The full result is in %WINDIR%\Logs\DefenseClaw\enterprise-lifecycle.log. Remediations cannot install, upgrade or change the config; the Win32 app does those. Nor can they put back a missing scanner runtime (one an antivirus quarantined from C:\ProgramData\Cisco\DefenseClaw-ScannerRuntime, say): Remediate-Fix.ps1 exits 1603, reports scanner_runtime_unavailable and names Setup /repair. Deploy DefenseClawSetup-Enterprise-Standalone-x64.exe /repair JSON=1 from the Win32 app content, as a second Win32 app or a platform script that runs as SYSTEM.
A missing hook executable is a protection failure for Claude Code, Codex, Cursor and Copilot even while their machine policy files stay installed. If antivirus quarantines C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw-hook.exe, stop affected agent use and repair the installation; the hook guardian checks for the file every 5 seconds and Setup /ensure and /repair can restore it from their payload. From an elevated prompt, require enterprise windows verify --profile standalone --json to pass before resuming agent use. Exclude C:\Program Files\Cisco\DefenseClaw\bin from quarantine in your EDR policy to prevent recurrence.
On a computer installed from the unsigned Setup, the Remediations ensure keeps the marker's hash_pinned trust mode, so detect.ps1, uninstall.ps1 and later runs keep accepting the unsigned CLI.
5. Deliver the Cisco AI Defense key
Keep the key out of the Win32 app, config.yaml and every Intune script. The config
must turn the feature on (Cisco AI Defense key).
After the Win32 app has installed DefenseClaw, store the key from an elevated
PowerShell 7 session on the device:
$cli = 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe'
$key = Read-Host -AsSecureString -Prompt 'Cisco AI Defense API key'
ConvertFrom-SecureString -SecureString $key -AsPlainText | & $cli enterprise secret set --name ai-defense-api-key --from-stdin
& $cli enterprise secret statusThe key goes from the prompt to standard input and never touches the disk. To
automate it, have your secrets agent write the key to a file only SYSTEM and
Administrators can change, run & 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe' enterprise secret set --name ai-defense-api-key --from-file <file> as SYSTEM, then delete the file. The command writes
C:\ProgramData\Cisco\DefenseClaw\secrets\ai-defense-api-key and restarts the
gateway. enterprise secret status never shows the value.
6. Change the config, upgrade and roll back
Change the config. On a device in bundle mode (bundle trust anchors installed),
deliver a new signed bundle instead: Setup refuses a config package with
bundle_required. Otherwise,
Setup applies a new config when /ensure runs with a config
that differs from the installed one. The registry rule detects by version only, so
Intune does not re-run an app for a config-only change. To roll out a new config,
re-author config.yaml as config_version: 9 (see
packaging/identity/entra/admin-config.windows.example.yaml). The packager
refuses a missing or older version. Setup migrates an older file during install,
so its installed hash would differ from the hash pinned in the package and the
custom detection rule would never match. To change the config:
- Build a package from the same Setup and the new
config.yaml. - Create it as a separate Win32 app.
- Use the config-aware detection script
instead of the registry rule. Set its minimum version and the
config_sha256value from the new package'sintune-package.json.
Devices with the old config are "not detected", so Intune runs the new package's
launcher and ensure re-applies the deployment. Do not edit the installed file by
hand; changes made outside Setup are not validated.
Upgrade. Build content for the new release and assign it as a new Win32 app. /ensure
upgrades in place and keeps the config and state. In bundle mode, keep the base and bundle apps
assigned and add a separate Setup-only app built without -ConfigPath and without
supersedence: superseding a base app that a bundle app depends on failed with
Intune error 0x87D300DB.
After each upgrade with Claude Code enabled, an administrator must repeat the
attestation; until then
status can report ok=true with security_complete=false.
Roll back. /ensure refuses a Setup older than the installed version
(downgrade_refused, 1603), so superseding with an older app does nothing.
First remove the newer Required Intune assignment from the target group
(intune_tenant.py remove-assignment --app NAME --group GROUP [--apply], or
remove it in the admin center). Then follow
Roll back.
Config-aware detection script
Use this instead of the registry rule when you roll out a config-only change. Not for a device in bundle mode: it refuses a config package with bundle_required, so deliver a new bundle app with its detect-bundle.ps1. Replace the two values at the top with the minimum version and the config_sha256 value from the new package's intune-package.json:
$minimum = [version]'X.Y.Z'
$configSha256 = 'replace-with-config_sha256-from-intune-package.json'
$base = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, [Microsoft.Win32.RegistryView]::Registry64)
$key = $base.OpenSubKey('SOFTWARE\Cisco\DefenseClaw\Enterprise')
if ($null -eq $key) { exit 1 }
$version = [string]$key.GetValue('ProductVersion')
$stateRoot = [string]$key.GetValue('StateRoot')
$key.Dispose()
$base.Dispose()
$core = ($version -split '[-+]')[0]
if (-not $core -or [version]$core -lt $minimum) { exit 1 }
$config = Join-Path $stateRoot 'etc\config.yaml'
if (-not (Test-Path -LiteralPath $config -PathType Leaf)) { exit 1 }
$actual = (Get-FileHash -LiteralPath $config -Algorithm SHA256).Hash.ToLowerInvariant()
if ($actual -ne $configSha256.ToLowerInvariant()) { exit 1 }
Write-Output "DefenseClaw Enterprise $version"
exit 07. Remove DefenseClaw
First remove every Required assignment of the install, upgrade and config apps
from the target device group (intune_tenant.py remove-assignment ... or the admin
center). Then assign the base app as Uninstall. Intune runs
Install-DefenseClawIntune.ps1 -Uninstall, which runs Setup /uninstall JSON=1. It
removes the services, hooks, machine-policy entries, registry marker, binaries and
machine state, and leaves enrolled accounts' per-user data. A twin app with
-Uninstall -Purge (Setup PURGE=1) removes that too.
packaging/mdm/windows/uninstall.ps1 [-Purge] does the same from any PowerShell.
Both are idempotent.
8. Troubleshoot
From an elevated PowerShell on the device:
& 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe' enterprise windows status --profile standalone --jsonok: true, installed: true and coverage_complete: true mean the app landed
(healthy fields). If it did not,
read AppWorkload.log and %WINDIR%\Logs\DefenseClaw\enterprise-lifecycle.log;
the table of symptoms is in the
Logs and symptoms.
Logs and symptoms
| Where | What |
|---|---|
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\AppWorkload.log | Intune's view of the Win32 app: download, install command, exit code, detection |
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\HealthScripts.log | Remediations runs |
%WINDIR%\Logs\DefenseClaw\enterprise-lifecycle.log | Every lifecycle result, one JSON line per run |
%WINDIR%\Logs\DefenseClaw\mdm-wrapper.log | The generic wrapper's steps, when you use it |
DefenseClaw event log, source "DefenseClaw Lifecycle" | Installed, upgraded, repaired, failed, busy and refused events |
To see the current state on a device, from an elevated PowerShell:
& 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe' enterprise windows status --profile standalone --json| Symptom | Likely cause |
|---|---|
Install fails with 1639 | No config in the package, or its enterprise.profile is not standalone. |
Install fails with 1639 and invalid_arguments | The config does not parse, is not UTF-8, does not validate, or sits where a standard user can change it. errors[].message names the line or the folder and the fix. |
Install fails with 1639: the gateway service cannot read the guardrail rule pack | The rule pack is missing, or NT SERVICE\DefenseClawGateway cannot read it or the folder above it. Deliver it with the rule-pack app as a dependency, or set the permissions with the Set-Acl lines there, then retry. |
| A gateway scan refuses a project inside a user profile | Run the scan as the signed-in user or move the project outside the profile. Scanner children inherit the gateway's write-restricted LocalSystem token. |
Setup reports user_runtime_folder_untrusted | The upgrade went on; only that account's old hook runtime copies stay, inert, in a folder whose permissions DefenseClaw could not verify. Inspect the folder named in the warning, reset its permissions or remove it if the account no longer uses DefenseClaw, then run Setup /ensure again. With a pending transaction the run fails with 1603 and names the same remedy. |
Install fails with 1603: a named service fails during start or stop | Inspect the Windows service events and that service's log, then run Setup /ensure again. A standalone start has a 30-second SCM request budget and a 60-second running-state budget; each stop wait has 30 seconds. |
Install fails with 1603 and powershell7_required | The PowerShell 7 dependency did not install, or is a preview build. |
Install fails with 1603 and mdm_hash_mismatch | The package content changed after the packager pinned it. Rebuild it. |
Intune reports 1618 and retries | Another lifecycle run held the lock. Intune retries three times, five minutes apart. |
Uninstall reports 1618 with uninstall_in_use | A program kept running from C:\Program Files\Cisco\DefenseClaw\bin, or (for the -Purge app) kept a file in C:\ProgramData\Cisco\DefenseClaw open, through every Setup run. Nothing was changed, unless the message says only the data folder is left: then DefenseClaw is removed and the next run deletes that folder. The message names each program, its process id, account and parent, and the file it has open. Intune retries; if the program stays, close it or sign the account out. |
| The app installs again every day | The detection rule does not match what Setup installed: check the key path, the 64-bit setting and the version. |
| Graph still shows Installed after uninstall | The app install report lagged device detection by more than 15 minutes in the live test. Check local Intune detection or enterprise windows status. |
Prepare your Intune tenant
What to set up in Microsoft Intune and Microsoft Entra ID before you deploy DefenseClaw with the Intune pages - licences, automatic enrollment, the Apple push certificate, device groups, assigning the package and the Remediations - and how identity-based guardrail profiles work on Intune-managed devices. Includes a Graph helper with a preview mode.
Intune on macOS
Deploy the standalone DefenseClaw enterprise profile to Apple silicon Macs with a Microsoft Intune shell script, report its version with a custom attribute, deliver the AI Defense key and remove it.