Deploy-Application.exe not installing with changed ps1 location

I’ve only just started with PSADT, and I can’t get past the following:
When I run Deploy-Application.exe using a ps1 file in the same folder, it works fine.
When I specify a custom ps1 location however, Deploy-Application.exe doesn’t perform the install (using the sample “Deploy-Application.ps1” here for testing; just renamed it app.ps1).

This works (same folder):

C:\Toolkit\Deploy-Application.exe app.ps1

This does not work:

C:\Toolkit\Deploy-Application.exe C:\temp\app.ps1

Similarly, this doesn’t work either:

C:\Toolkit\Deploy-Application.exe "\\\app.ps1"

When I say it does not work, I can see in Task Manager that the Deploy-Appliction.exe process starts and immediately exits. No logs are generated.
I’m testing this on a Windows 11 Home 21H2 (22000.739) machine.

I’ve tried with and without quotes for the ps1 parameter, and use the -command as per the documentation, but I must just do something basic quite wrong?


I’ve had nothing but grief with Deploy-Application.exe and gave up on it years ago. It’s not flexible.
I would go straight to the PS1 file like this:

powershell.exe -ExecutionPolicy Bypass -File "\\\app.ps1" Install NonInteractive

PRO TIP: Don’t hard code the path to your app.ps1 with the IP address. IP addresses change. Use a DNS name instead.

Also, If you need a way to launch a powershell script and hide the PS console there are other ways.

Got it, thank you. So if the basics don’t quite even work for the exe, just using ps1 files only look like the easiest route and it does the job. I got the sample to run fine now with that.

I’m thinking of getting the toolkit still to be copied locally and then download the software as needed and then trigger the installs.

As a test I could trigger the line in the app.ps1 sample to look at the local

[string]$moduleAppDeployToolkitMain = "C:\Toolkit\AppDeployToolkit\AppDeployToolkitMain.ps1"

That will get me on to the next steps. Noted re: IP based paths. This was just as a sample. I’ve got a bit of work to do to make it robust but for now I just want a proof of concept.

The next step is actually to download the installers from an AWS S3 bucket before triggering the install to avoid a hassle with people needing to be connected to the network (e.g. in office or VPN).

Thanks for your feedback!

Usually each app/package gets their own copy of PSADT and the source files go in the \Files\ folder.
PSADT does change.

Also it sounds like you are building Intune from scratch. There might be existing solutions here:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.