Intune Win32 Detection Rule Builder

Validate Win32 app detection rules and generate a custom detection PowerShell script that reports "app detected" only when every rule condition holds. Rule types, required fields and character restrictions follow the official documentation.

Advertisement

The detection contract (custom script)

Exit code STDOUT How Intune reads it
0non-emptyDetected (app is considered installed)
0no outputNot detected (app is considered absent)
non-zero—Error (detection failed, deployment does not continue)

The default script timeout is 60 seconds; exceeding it counts as a detection failure. Avoid heavy work such as enumerating all of Win32_Product.

Rules per type (official)

Reference: Microsoft Learn — Add Win32 apps / Step 4: Detection rules

Common pitfalls