Error using PSADTV4

I am attempting to make the switch to V4 and am having an issue.

I create the template folder, add my installer to \Files, edit the Config\config.psd1 file to change log locations and then make basic edits to the invoke-AppDeployToolkit.ps1 to install the application.

This application installs just fine in Sandbox and everything looks good, but once the intunewim is generated and added to Intune, it fails every time without creating a log from the toolkit.

I do not see much helpful in the IntuneManagementExtension logs in regards to this either. The best I get is a log in c:\Windows\Logs\Invoke-AppDeployToolkit.exe (which is not one of my set log locations from config.psd1).

This log simply has the following:

Commencing invocation of C:\Windows\IMECache\12374212-1234-1234-1234-123456781234\Invoke-AppDeployToolkit.ps1
Silent mode detected. No user interaction will be displayed.
Administrator rights are required. The verb 'RunAs' will be used with the invocation.
No '-File' parameter specified on command-line. Adding parameter '-File "C:\Windows\IMECache\12374212-1234-1234-1234-123456781234\Invoke-AppDeployToolkit.ps1"'...
Executable Path: C:\WINDOWS\system32\WindowsPowerShell\v1.0\PowerShell.exe
Arguments: -ExecutionPolicy Bypass -NoProfile -NoLogo -WindowStyle Hidden -File "C:\Windows\IMECache\12374212-1234-1234-1234-123456781234\Invoke-AppDeployToolkit.ps1" -Deploymenttype Install -Deploymode Silent
Working Directory: C:\Windows\IMECache\12374212-1234-1234-1234-123456781234\ 
An error occured while running Invoke-AppDeployToolkit.ps1. Exit code: 1

I have no idea why this will not run. The command given was to run this in Interactive mode, not silent. (GUID in this is obvious fake because I had to retype all of that instead of copy\paste)

My Intune install command is: Invoke-AppDeployToolkit.exe -DeploymentType Install -DeployMode Interactive.

Falling back to V3 I was able to build the package and get it fully operational. I never had a problem there, but have not been able to get a single package to work with V4.

No clue about the cause of your error 1 but if you want an interactive install in Intune, you have to force it with ServiceUI

Yea, that does make sense on the running silent bit.

I am just not sure which direction to go with the rest of it. V4 has a lot of things I would like to be able to use, but as it stands it is not at all useful if I can’t get a basic package to install at all through Intune.

An exit code of 1 usually indicates that there’s some kind of typo in Invoke-AppDeployToolkit.ps1. My recommended goto here would be to enable system-wide PowerShell transcription, which can either be done via a configuration profile or gpedit.msc locally (refer to Turn on PowerShell Transcription).

Once this is enabled to your specified directory, any error output from PowerShell will be captured to text file and will give you proper visibility into what the go is.