How do I use PSAppDeployTookit with Intune?

I have been searching and it seems most posts are people who already know what to use.

I setup a script according to the examples I’ve seen. Running it works fine. I wanted to add a defer to an Intune App.

When I deploy the app I am using Execute-MSI to do the install.

When I tested through Intune I tried a User based install as it should get a user interaction. I got blocked running the script and was prompted to authenticate to run the script as admin.

When running as a computer based install there is no interaction so I don’t see a prompt.

What is the proper way to deploy through Intune?

Ooo do I need to sign the ps1 script?

Intune is feature incomplete.
Unlike SCCM/MECM, there is no check box to “Allow users to view and interact with the program Installation”. This type of feature is needed for application installations to display GUIs.

So with Intune, we need to use ServiceUI.exe as mentioned here.

FYI: You might want to tell MS you need this feature and vote for it.

At this time, it only has 80 votes!

Does this mean in Deploy-Application.ps1 I should use the command Invoke-ServiceUI instead of Execute-MSI?

Invoke-ServiceUI.ps1 is a standalone script to launch ServiceUI.exe if a user is logged-on.
Because Intune is missing that feature (still at 80 votes!! :frowning_face: ) to make GUIs displayable to users, we have to silly things before we launch PDAST with Intune.

While instructions given here are good for people who know PSADT well and can read “between the lines”. While you could enter the long command line as shown at the bottom of the page, here’s a simpler way:

Step 1 - Obtain ServiceUI.exe

ServiceUI.exe is a MS tool that is part of something called MDT. (Get your before MS takes it down) Download that huge file and extract your copies of ServiceUI.exe, 64bit and 32 bit versions. (BTW: I only use 64 bit)

Place ServiceUI.exe in the same folder as Deploy-Application.ps1

Step 2 - Obtain Invoke-ServiceUI.ps1 and CMD files

In the files of the v3.10.1 release of PSADT, copy all the files except readme.md from \Examples\ServiceUI\ to the same folder as Deploy-Application.ps1

Step 3 - Make Intune call the sample CMDs

Go through the steps to create the Win32App in Intune as normal.

Then for your Win32app, in the Program tab enter:

▼ Enter this below ▼
Install command install_forceinteractive.cmd
Uninstall command uninstall_forceinteractive.cmd

CAVEAT: If you need to send custom parameters or have changed the name of Deploy-Application.ps1 you will need to change the sample CMD files.

How’d you know I was working on this right now… :slight_smile:

I was just starting to decipher what to do.

Thank you

1 Like

Like this?

1 Like

For Intune is the App created supposed to run as User or System?

Install failed as System app.

Has to be System.

Look at the PSADT log file to find out why it failed.

I didn’t follow all the instructions under the readme.

PSAppDeployToolkit/Examples/ServiceUI/README.md at main · PSAppDeployToolkit/PSAppDeployToolkit · GitHub

I just needed to rename the exe’s. ServiceUI_x86.exe and ServiceUI_x64.exe

1 Like

It seems to be working and prompted me.

How would this work if I used Deferals?

I can’t help you with deferrals. I don’t use them.

I assume it should work.

Thanks for your help. It was really great. Much appreciated.

Hi, this works like a charm thanks !

Do you have any idea if i can hide the CMD window during the Install?

BR

This has already been answered here:

1 Like