← Back to Home

Microsoft Intune Win32 app deployment is a common way to ship custom software to Windows devices. When installs need more than a single command. Prerequisite checks, conditional steps, or multi-step logic. You used to rely on workarounds that made deployments harder to maintain. Intune now supports PowerShell scripts natively in the Win32 app Program settings: you upload a .ps1 file, choose 32-bit or 64-bit execution, and Intune runs it during install. This post explains what changed, why it helps, and how to use it.

What used to be difficult

Win32 apps in Intune have install and uninstall command fields. That worked for simple cases (e.g. msiexec /i app.msi /quiet). For anything that needed a script, you had to:

  • Pack the script inside the .intunewin package with the Content Prep Tool and call it from the install command (e.g. powershell.exe -ExecutionPolicy Bypass -File ".\install.ps1").
  • Deal with a single command line: complex logic became one long, hard-to-read string in the portal.
  • Handle 32-bit vs 64-bit PowerShell: calling powershell.exe from the default install context often ran 32-bit PowerShell on 64-bit Windows, so you had to force 64-bit explicitly when needed.

Changing the script meant repackaging the whole app and re-uploading the .intunewin file, which slowed iteration and troubleshooting.

What’s new: native PowerShell in Program settings

In the Win32 app Program configuration, you now get a PowerShell script option alongside the usual install/uninstall command fields. You can:

  • Upload a .ps1 file directly in the Intune portal; the script is stored with the app configuration, not inside the .intunewin package.
  • Choose execution architecture: run the script as 32-bit or 64-bit on 64-bit clients, so you no longer need to call the right PowerShell executable yourself.
  • Rely on native execution: Intune runs the script, respects exit codes, and integrates with Intune’s deployment and logging.

Application files stay in the .intunewin package; install logic lives in the script you upload. That keeps payload and logic separate and makes script changes independent of the package.

PowerShell script installation option in Win32 app Program settings.

PowerShell script installation option in Win32 app Program settings

Why this helps

Update scripts without repackaging: You can fix or change the install script in the portal and save; no need to repackage the app or upload a new .intunewin. That makes testing and maintenance much faster.

Clear split between payload and logic: The app package holds binaries and data; the script holds install steps. That makes it easier to read what the deployment does, troubleshoot (script vs package), and maintain scripts in version control separately.

Better behaviour from Intune: Exit codes from the script are used for success/failure reporting, and script execution is part of Intune’s logging, so you get clearer deployment status and diagnostics.

Architecture control: Choosing 32-bit or 64-bit for the script avoids the old “wrong PowerShell bitness” issues when the app or dependencies need a specific process architecture.

How to use it

When creating or editing a Win32 app in Intune:

  1. Prepare your script: Write the install (and uninstall if needed) logic in a .ps1 file with proper error handling and exit codes (e.g. 0 for success, non-zero for failure) so Intune can report pass/fail correctly.
  2. In Program settings, choose the option to use a PowerShell script for install (and optionally for uninstall) instead of typing a command.
  3. Upload the .ps1 file(s) in the portal. They are stored with the app; they do not need to be inside the .intunewin.
  4. Set whether the script should run as 32-bit or 64-bit on 64-bit clients, based on your app’s requirements.
  5. Complete the rest of the app (detection, requirements, assignments), then test in a pilot group before broader rollout. Because you can change the script without repackaging, you can iterate quickly.

If you already use scripts in .intunewin

For existing Win32 apps that call a script from inside the package, you can move to the new model: extract the script from your source (or from the unpacked .intunewin), add it in the Win32 app’s Program settings as a PowerShell script, remove the script from the app source, repackage with the Content Prep Tool so the .intunewin no longer contains the script, and update the app in Intune. After that, script changes are done in the portal only.

Practices that help

Use clear exit codes so Intune can report success or failure. Add logging (e.g. Write-Host or log files) for multi-step installs. Test in a small group first. Document what the script does and any prerequisites. Keep scripts in version control. Choose 32-bit or 64-bit based on what the app and its dependencies need.

Summary

Intune’s native PowerShell script support for Win32 apps lets you upload a .ps1 in the app’s Program settings, pick 32-bit or 64-bit execution, and have Intune run it during install (and uninstall). You no longer need to bundle the script in the .intunewin or build a long install command. Script updates can be done in the portal without repackaging the app, and the split between app payload and install logic makes deployments easier to maintain and troubleshoot. For apps that already use a script inside the package, migrating to the new option is worth considering for long-term simplicity.