Intune – You can now use a PowerShell script when deploying a Win32 app

As you know, with Intune you can package Windows applications (aka legacy, aka Intune package [Win32]).

This package can include PowerShell scripts to perform the installation/uninstallation processes.

When deploying such Win32 app, it could have been a bit complex as you had to use the command line to properly run the scripts, including parameters or context.

Well, good news as now you can use PowerShell scripts directly for installer/uninstaller type instead of using a command line (using powershell.exe -executionpolicy Bypass -windowstyle hidden -file for example).

Being able to use a PowerShell script instead of the command line is helping you to ensure you can have pre-requisites (other than OS version), post install actions or any other advanced configuration activities more easily.

To use PowerShell scripts for install/uninstall type, you need to package the script as part of the Win32 in addition of the application binaries as had to do before and then select the new PowerShell script type to upload the scripts.

image

Limitations

  • Scripts are limited to 50 Kb in size
  • Scripts are running under the same context than the installer (system or user)
  • Scripts must return the execution code to define the installation success or failure
  • Scripts must run without any user interaction
  • If multi-admin approval is enabled, you need to create the application first using the ‘classic’ method (command line) and then once all admins have approved, edit the application to use PowerShell script instead

When to use the PowerShell script type

Consider using PowerShell script installers when:

  • Your app requires prerequisite validation before installation
  • You need to perform configuration changes alongside app installation
  • The installation process requires conditional logic
  • Post-installation actions are needed (like registry modifications or service configuration)

Leave a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.