# Error using PSADTV4

**URL:** <https://discourse.psappdeploytoolkit.com/t/error-using-psadtv4/5955>\
**Category:** General Discussion\
**Created:** [December 23, 2024, 6:16pm UTC](https://discourse.psappdeploytoolkit.com/t/error-using-psadtv4/5955 "2024-12-23T18:16:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dspencer42](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.psappdeploytoolkit.com/dspencer42/32/2017_2.png) [@dspencer42](https://discourse.psappdeploytoolkit.com/u/dspencer42)\
**Post date:** [December 23, 2024, 6:16pm UTC](https://discourse.psappdeploytoolkit.com/t/error-using-psadtv4/5955/1 "2024-12-23T18:16:43Z")

</div>

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![That-Annoying-Guy](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.psappdeploytoolkit.com/that-annoying-guy/32/22_2.png) [@That-Annoying-Guy](https://discourse.psappdeploytoolkit.com/u/That-Annoying-Guy)\
**Post date:** [December 23, 2024, 6:58pm UTC](https://discourse.psappdeploytoolkit.com/t/error-using-psadtv4/5955/2 "2024-12-23T18:58:24Z")

</div>

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](https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/tree/main/examples/ServiceUI)

---

<div class="post-metadata">

**Author:** ![dspencer42](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.psappdeploytoolkit.com/dspencer42/32/2017_2.png) [@dspencer42](https://discourse.psappdeploytoolkit.com/u/dspencer42)\
**Post date:** [December 23, 2024, 8:41pm UTC](https://discourse.psappdeploytoolkit.com/t/error-using-psadtv4/5955/3 "2024-12-23T20:41:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mjr4077au](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.psappdeploytoolkit.com/mjr4077au/32/1976_2.png) [@mjr4077au](https://discourse.psappdeploytoolkit.com/u/mjr4077au)\
**Post date:** [December 24, 2024, 1:08pm UTC](https://discourse.psappdeploytoolkit.com/t/error-using-psadtv4/5955/4 "2024-12-24T13:08:37Z")

</div>

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](https://admx.help/?Category=Windows_10_2016&Policy=Microsoft.Policies.PowerShell::EnableTranscripting)).

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex036/uploads/psappdeploytoolkit/original/2X/2/296bb7797853b45fe66ad18274e3c862b7829527.png) [@system](https://discourse.psappdeploytoolkit.com/u/system)\
**Post date:** [February 18, 2025, 4:04pm UTC](https://discourse.psappdeploytoolkit.com/t/error-using-psadtv4/5955/5 "2025-02-18T16:04:36Z")

</div>

Closed on February 18, 2025, 4:04pm UTC

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