Powershell script InTune win32app deployment command

Hi there,

I’m new to the application and to intune win32app deployments so apologies if this comes across as basic. The guides I’ve found online are guides relating to how to push out apps and not PS scripts which is what I think is causing the issue.

I’ve created a powershell script that I’d like to deploy out via intune using the PSADT due to the user interaction functionality.

I’ve copied the contents of the powershell script into Deploy-Application.ps1 under the ## section. When I run Deploy-Application.ps1 and Application-Deploy.exe it works as expected.

I’m packaging it using the IntuneWinAppUtil.exe tool. I’m selecting the Toolkit as the Source folder and Deploy-Application.ps1 as the Setup File (Is this correct)?

From there I’m Uploading the package to Intune as a win32App.

I’m unsure what install command I need to use. I’m Also unsure if this is best practice for deploying a PS script using the tool.

Any help is appreciated.

Figured out what I needed to do. If anyone’s interested:

So the reason we needed this was because we were trying to uninstall a product ( forcepoint ) that would break network traffic after a restart. We couldn’t just push out an uninstall script via intune as it would restart randomly without a user knowing and needed some user interaction.

I got this working using PSADT, Microsoft Win32 Content Prep Tool and ServiceUI.exe from the Microsoft deployment toolkit.

Firstly, I downloaded PSADT and edited the Deploy-Application.ps1 script and copied my script into the “perform installation tasks here” section

Next I Copied ServiceUI.exe from the MDT to the Toolkit folder of PSADT folder

From there I ran intuneWinAppUtil.exe from the win32 prep tool. I selected the source folder as the toolkit from PSADT, The Setup folder as ServiceUI.exe in the toolkit folder and outputed it to an easy to access folder and selected no on the last option.

On intune I uploaded the intunewin file as a win32 app and selected the install command “ServiceUI Deploy-Application.Exe” and put a random string in the uninstall as I didn’t need it.

I then set up my detection rules to only run if it detects the application I want to install is installed. When it pushes out to users they get the option to install/defer and can run it at a time that is suitable for them.

1 Like