Deploying Win32 applications via Microsoft Intune is fantastic for installing customised software, however handling that complex installation logic has always been fairly clunky. The previous Install Command field during the Intune setup wizard is only helpful for simple install switches, but as soon as you need to check prerequisites or handling anything more complex, you are forced into wrapping your PowerShell script inside your IntuneWin file.
This process was simply a “workaround” , you would call it with commands like powershell.exe -executionpolicy bypass -file ".\install.ps1" and it worked, but still, a workaround…
As of recent, Microsoft have officially added native support for PowerShell scripts in the “Program” settings of Win32 app deployment. This is a small change greatly simplifies the process for deploying and modifying complex apps in deployment.
This post will break down what exactly has changed, why it’s a significant improvement over the old method and how you can use it.
Command Lines and Wrappers
Previously on the Program tab of a Win32 app, we were given two simple text fields: Install command & Uninstall command. The limitation is that Intune expected a single command, which usually led to problems for installs that wasn’t a simple MSI, for example:
- Complex Commands: For complex commands, it would become a long unreadable string in the Intune portal which is hard to manage.
- Wrapper Scripts: You had to write a PowerShell script and package it with your source files using the Content Prep Tool and then use your Install command to call that script.
- 64-bit PowerShell: Calling PowerShell.exe will result in a 32-bit PowerShell instance. You had to force 64-bit execution with a specific command.
This is a painful process, especially when having to go through the process of testing and making changes to your script “on the go”.
Direct PowerShell Script Integration
This new update, which is confirmed by the documentation (which I carefully tracker on msdocstracker.com), adds a dedicated PowerShell scripts installation option alongside the old command-line fields.
When you select your desired script, you have the option to run the script as 32-bit process on 64-bit clients, which solves previous headaches around selecting the correct PowerShell instance.
The important bit about this new process is that your script is no longer inside the .intunewin file, but now a first-class part of the applications configuration settings in Intune.
Benefits of using a separate script
There are some great benefits to working through your existing Win32 apps and separating the PowerShell scripts from the .intunewin files. Above and beyond solving the 64 bit problem, here are some other benefits:
- Simplified iteration: This is by far the biggest win. If you had an issue in your previous script, or just needed to update it due to some other factors, you can now update it without having to re-package the whole app source and re-upload it to Intune.
- Install separation: There is now a clear line between the payload (the .intunewin file) and the installation logic (the .ps1 file), which makes your application cleaner to read and troubleshoot.
- Removes complexity: The install-command path is no longer just a dumping ground for commands which escape the original context of the command, Intune handles the execution, exit codes and logging natively.
Final thoughts
I think this is a great step forward by the Intune team at Microsoft, who have clearly been looking at some of the struggles of day to day Intune admins and taken the feedback from some if its trusted community members (MVPs). Although, while this new feature does remove a layer of friction so to speak, it doesn’t replace full-fat wrappers like the PowerShell App Deployment Toolkit (PSADT) for more complex user-interactive installs, but it does plug the gaps for most of us.

