PowerShell Intune Analyzer

Browser-only

Paste a PowerShell script and get a deployment-readiness score with the issues that make scripts hang, silently fail, or report success when nothing happened.

Runs entirely in your browser. The values you enter are processed locally and are never sent to IntuneBench. You can use this tool offline once the page has loaded.
The success contract differs by purpose, so the checks adapt.

How it works

Choose how the script will be used — a platform script, a Win32 detection script, or a remediation script — and the analyzer applies the checks that matter for that purpose. It produces a score from 0 to 100 and a list of findings, each with a suggested fix.

What it checks

  • Exit codes. A script with no explicit exit inherits the last command's result, which can report success after an earlier failure.
  • Error handling. Without $ErrorActionPreference = 'Stop' or try/catch, non-terminating errors pass through unnoticed.
  • Interaction. Read-Host, Get-Credential, Out-GridView and similar prompts hang until the 30-minute timeout.
  • Context. User-scoped locations such as HKCU and $env:USERPROFILE behave differently when the script runs as SYSTEM.
  • Architecture. Intune runs in a 32-bit host by default, so Program Files and HKLM can be redirected on 64-bit devices.
  • Size and timeout. Scripts must be under 200 KB and time out after 30 minutes.
  • Secrets. Hardcoded passwords and keys are flagged.
  • Detection contract. A detection script must write to STDOUT and must not write to STDERR.

Supported scenarios

  • Reviewing a script before you upload it to Intune.
  • Diagnosing a script that reports success but does nothing, or that times out.
  • Checking a Win32 detection script against the STDOUT and exit-code contract.

Output

Each finding is graded Error, Warning, Recommendation or Note. Errors will break or hang the script; warnings commonly cause silent failures; recommendations improve reliability. The suggested boilerplate addresses exit codes, error handling and logging as a starting point.

Common problems

  • Platform scripts time out after 30 minutes and are retried three times on later check-ins.
  • Scripts do not run on Windows in S mode or on Surface Hub.
  • Intune scripts are stored in the service and readable by administrators, so never embed secrets.
  • Scripts run before Win32 apps during a device's processing cycle.

Related

Guide: Intune app troubleshooting · Detection Rule Generator · Win32 App Health Checker · All tools

Something went wrong. Reload ×
↑↓ navigate ↵ open Esc close