Multiple Deployment Types Intune using PSADT


In MECM we have two deployment types for every application, one interactive and one noninteractive.

Deploy-Application.exe Install Interactive (REQ if user logged in)
Deploy-Application.exe Install NonInteractive (REQ if user logged off)

These have PS requirements if the user is logged on or not and mainly for builds as the toolkit welcome messages, pause the build process.

Just wondered if anyone has had a similar issue and how they got around it with win32 apps in intune as you can only have one install command line/type.

Hi Gordy,

I think most people get around it by executing the install using a “pre-install” script that detemine if a user is logged on or not and then runs the PSADT script “Interactively” or “Non-Interactively”. Check out this blog post User Interactive Win32 Intune App Deployment with PSAppDeployToolkit | Semi Annual Chat (, it’s one of the earlier ones that talk about and has a solution for this issue.

I have used the modified script that “NicO” posted in the Comments to overcome this problem when deploying applications with Intune that require user interaction only when a user is logged on.

Note that if you are also installing the application in question during Autopilot there might be other script solutions that could handle that scenario better.

Thank you for the reply.

Yes, I have been using ServiceUI.exe for pretty much all the deployments thus far (ServiceUI.exe Deploy-Application.exe Install Interactive) but the issue we have now encountered which I think was overlooked is builds for AP devices. they get stuck as the install welcome comes up.

Annoyingly, it isn’t feasible for us to amend 300 apps currently in intune with a new script to run interactive or noninteractive and I think i have answered my question in saying, those apps will need to remain noninteractve until updated with a new target script to run, either interactive or noninteractive.

I am going to start using this solution: How do I use PSAppDeployTookit with Intune? - The Toolkit / General Discussion - PSAppDeployToolkit Community but I was hoping if there was a magic solution to amend the current applications.

So this has reared its ugly head again…

The fix works but is still failing at autopilot enrolment stage. Build teams claiming the machines failing as user interaction for the deployment still coming up…

has anyone else experienced this situation as well?

PSADT has code to turn off user interaction in AppDeployToolkitMain.ps1
In PSADT v3.10.1 there is a variable called $IsOOBEComplete and an If statement that changes $deployMode to ‘Silent’

You could check and log if the User Interaction stuff inside Deploy-Application.ps1

FYI: $IsOOBEComplete is not mentioned in Variables · PSAppDeployToolkit


Check out barret101’s PreLaunch script, it looks like he has a solution for the AutoPilot/ESP/OOBE scenario:

PSADT-PreLaunchCheck/Win32App_PSADT_PreLaunch.ps1 at main · barrett101/PSADT-PreLaunchCheck (

Thanks both.

barret101’s solution code is broken and the other solution does work (to a degree).

Rebuilt an AP device with three apps using the invoke script, one installed silently during enrolment but the other two came down after the user (me) logged in.

Checked the logs and one application was fine:

[Initialization] :: Detected OOBE in progress, changing deployment mode to silent.

However, some apps come down after enrolment and initiate the interactive script as a user has logged in. That’s right but I think we want all apps to install silently during enrolment ready so, I am not sure if its just the enrolment stage in general which is at fault.

The PSADT guys have created an example script for ServiceUI usage with Intune that might help you, I haven’t tested it yet but it might work for you or give you inspiration for creating your own: PSAppDeployToolkit/Examples/ServiceUI/Invoke-ServiceUI.ps1 at main · PSAppDeployToolkit/PSAppDeployToolkit (

Just in case you were not aware, (If this might be the reason you are having app install failures during ESP (Enrollment Status page)) you can not mix install types on the ESP.
Rather than me retype this verbatim, see this good explaination on Reddit:

1 Like

Thank you for the reply.

Yes, we are only assigning win32 apps during enrolment (as far as I am aware) and we have no LOB applications. I wonder if Store applications could be at fault though…

Funny with LoB though as, we have App-V apps which were left behind by a previous vendor and MS advised to convert these to MSIX… easy enough… and then those to be LoB apps… but, we cant mix those in enrolment. That isn’t a solution then MS you have given us another problem.

1 Like

This is the one which seems to be working well for me. I’m just querying (not for this forum) why some apps come down after enrolment.

1 Like

I don’t have much experience with Autopilot/ESP but isn’t that how it works by design? And if you require certain applications to install before a user is allowed to logon then you need to configure those applications in the “Blocking apps” list?

This is the script you are looking for:

PSAppDeployToolkit/Examples/ServiceUI at main · PSAppDeployToolkit/PSAppDeployToolkit (

With that you can have it run silent when no user is logged on, and interactive if they are logged on, or only interactive if a specific process is running.