Intune Remediation · Detects and removes Win32 apps not launched in over 6 months
Uses EstimatedLastUsed from the Uninstall registry key — this data is written by Windows but not every installer populates it. Apps with no last-used date are skipped to avoid nuking something critical. Test in a pilot group first.
Heads up: Intune Remediations are two-script pairs — a detect script that exits 0 (compliant) or 1 (non-compliant), and a remediate script that fixes it. Intune only runs the remediation script if detection exits 1.
Detection Script
D
Detect apps unused for 6+ months detection
Exits 1 (non-compliant) if any qualifying unused apps are found. Exits 0 if the device is clean.