I have a question regarding PowerShell App Deployment Toolkit 4.1.3 and the new dialog functionality.
As I understand it, in versions prior to 4.1 we had to use ServiceUI to display dialogs – which made sense (even though it could be worked around differently).
In 4.1.x, dialogs no longer require ServiceUI. However:
when I run them as Administrator / normal user, they work fine,
when I try to trigger them from the SYSTEM account (e.g. using psexec -si), the session crashes with errors.
In my case, packages are delivered via Intune, so I need to know whether dialogs are expected to work in this scenario.
I’m using PowerShell 7.
Question:
Is this behavior by design (dialogs not supported under SYSTEM), or do I have something misconfigured?
Should dialogs in PSADT 4.1.3 actually work when running under the SYSTEM account, or are they user-context only?
Saying it crashes with errors but not showing the error(s) doesn't give us much to go by. Can you please paste in the full error? You also don't need to specify the -i parameter to psexec.exe.
That’s exactly why I asked the question in more general terms – I wanted to clarify in which context these dialogs are actually expected to work (SYSTEM vs user).
But since you asked for the error, here it is:
[2025-09-03T09:06:31.9181740+02:00] [Pre-Install] [Show-ADTInstallationWelcome] [Error] :: Exception calling "Remediate" with "2" argument(s): "Method not found: 'System.Security.AccessControl.FileSecurity System.IO.FileInfo.GetAccessControl(System.Security.AccessControl.AccessControlSections)'."
Error Record:
-------------
Message : Exception calling "Remediate" with "2" argument(s): "Method not found: 'System.Security.AccessControl.FileSecurity System.IO.FileInfo.GetAccessControl(System.Security.AccessControl.AccessControlSections)'."
InnerException : System.MissingMethodException: Method not found: 'System.Security.AccessControl.FileSecurity System.IO.FileInfo.GetAccessControl(System.Security.AccessControl.AccessControlSections)'.
at PSADT.ClientServer.ClientPermissions.Remediate(RunAsActiveUser runAsActiveUser, IReadOnlyList`1 extraPaths)
at CallSite.Target(Closure, CallSite, Type, Object, String[])
FullyQualifiedErrorId : MissingMethodException,Show-ADTInstallationWelcome
ScriptStackTrace : at Private:Set-ADTClientServerProcessPermissions, C:\C-01_Custom\PSAppDeployToolkit\PSAppDeployToolkit.psm1: line 2096
at Private:Invoke-ADTClientServerOperation, C:\C-01_Custom\PSAppDeployToolkit\PSAppDeployToolkit.psm1: line 1214
at Show-ADTWelcomePrompt, C:\C-01_Custom\PSAppDeployToolkit\PSAppDeployToolkit.psm1: line 19232
at Show-ADTInstallationWelcome<Process>, C:\C-01_Custom\PSAppDeployToolkit\PSAppDeployToolkit.psm1: line 19542
at Set-WAMPDisplayWindow<Process>, C:\C-01_Custom\PSAppDeployToolkit.Extensions\WAMPPSAppDeployToolkit.ActionsExtensions.psm1: line 4752
at Set-WAMPScriptActions<Process>, C:\C-01_Custom\PSAppDeployToolkit.Extensions\WAMPPSAppDeployToolkit.CoreExtensions.psm1: line 427
at Get-WAMPScriptDeploymentType<Process>, C:\C-01_Custom\PSAppDeployToolkit.Extensions\WAMPPSAppDeployToolkit.CoreExtensions.psm1: line 253
at Set-WAMPProjectSetting<Process>, C:\C-01_Custom\PSAppDeployToolkit.Extensions\WAMPPSAppDeployToolkit.CoreExtensions.psm1: line 185
at Install-ADTDeployment, C:\C-01_Custom\Invoke-AppDeployToolkit.ps1: line 243
at <ScriptBlock>, C:\C-01_Custom\Invoke-AppDeployToolkit.ps1: line 455
at <ScriptBlock>, <No file>: line 1
PositionMessage : At C:\C-01_Custom\PSAppDeployToolkit.Extensions\WAMPPSAppDeployToolkit.ActionsExtensions.psm1:4752 char:11
+ Show-ADTInstallationWelcome @params
This looks like an edge case we missed during development. The problem is we ship .NET Framework DLLs with the module, but there's been some changes regarding in .NET Core regarding getting/setting ACLs on FileInfo/DirectoryInfo objects.
I'll look at this tonight after dinner and will ensure it's patched in 4.1.4, which will release this week.
Regarding Windows PowerShell 5.1, why the sadness? It's all I use for the most part as I get no real value out of PowerShell 7, and likely won't until Microsoft include it in the OS.
Do you mean the ternary operator? There's definitely a lot of interior challenges between the two, as you've seen by the bug you've encountered and reported here