4.1.3 - Show-ADTBalloonTip - The client process returned an exception / Access Denied

Hi, long time PSADT user here (since 2017). I've been working on my move from v3 to v4.x for a while now, testing all the v4 releases up to the current version 4.1.3 and was just waiting for the most stable release before going "live". I get an exception error/access denied message (see below) when trying to use Show-ADTBalloonTip.

I've wasn't planning on using Show-ADTBalloonTip in v4 but as there is a new "-Force" switch in 4.1.3 I thought that might be especially useful when the 'Auto' deploy mode runs the deployment silently when no process are running, giving us option to at least show toasts as an indication of when the deployment has completed. Of course SCCM/Intune can show notifications, but we tend to set that to only show notifications for restarts and I've always been happy with v3 displaying toasts.

For my test I'm running a powershell prompt as the SYSTEM account via psexec, whilst I'm logged on to Windows 11 as non-admin user account.

For trouble-shooting, if I open a powershell prompt with a local-admin account (whilst logged in to Windows with my standard user account) and run the script, Show-ADTBalloonTip runs fine.

For testing, I've kept it nice and simple:
Show-ADTBalloonTip -BalloonTipTitle 'MyTitle' -BalloonTipText 'my Text' -Force
I've tried with and without -Force, and different deploy modes.

We have a lot of GPO best-practice security baselines policies, along with AppLocker etc. So to rule that out I'm now testing on a Win11 dev build that Microsoft provide in Hyper-V, so it's a completely vanilla standalone environment. The error is the same.

On a different note, what's with the reference to a D: drive? It's like the script unpacks and mounts a temporary drive to work from. I'd be interested to hear more about that from the PSADT team.

I look forward to hearing your thoughts on this and many thanks in advance.

[2025-08-28T01:57:07.8336646-07:00] [Post-Install] [Show-ADTBalloonTip] [Info] :: Displaying balloon tip notification with message [my Text].
[2025-08-28T01:57:08.2356636-07:00] [Post-Install] [Show-ADTBalloonTip] [Error] :: Exception calling "ShowBalloonTip" with "1" argument(s): "The client process returned an exception."
Error Record:
-------------

Message               : Exception calling "ShowBalloonTip" with "1" argument(s): "The client process returned an exception."
InnerException        : PSADT.ClientServer.ServerException: The client process returned an exception. ---> System.TypeInitializationException: The type initializer for 'PSADT.AccountManagement.AccountUtilities' threw an exception. ---> System.ComponentModel.Win32Exception: Access is denied
                           at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
                           at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
                           at System.Diagnostics.Process.OpenProcessHandle(Int32 access)
                           at PSADT.Security.PrivilegeManager.GetPrivileges() in D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT\Security\PrivilegeManager.cs:line 113
                           at PSADT.AccountManagement.AccountUtilities..cctor() in D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT\AccountManagement\AccountUtilities.cs:line 175
                           --- End of inner exception stack trace ---
                           at PSADT.UserInterface.DialogManager.ShowBalloonTip(BalloonTipOptions options) in D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT.UserInterface\DialogManager.cs:line 259
                           at PSADT.ClientServer.ClientExecutable.ShowBalloonTip(IReadOnlyDictionary`2 arguments) in D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT.ClientServer.Client\ClientExecutable.cs:line 562
                           at PSADT.ClientServer.ClientExecutable.EnterClientServerMode(ReadOnlyDictionary`2 arguments) in D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT.ClientServer.Client\ClientExecutable.cs:line 381
                           --- End of inner exception stack trace ---
                           at PSADT.ClientServer.ServerInstance.Invoke[T](String command) in D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT.ClientServer.Server\ServerInstance.cs:line 688
                           at CallSite.Target(Closure , CallSite , Object , Object , Object )

FullyQualifiedErrorId : ServerException,Show-ADTBalloonTip
ScriptStackTrace      : at Private:Invoke-ADTClientServerOperation, C:\Temp\MyTestPackage\PSAppDeployToolkit\PSAppDeployToolkit.psm1: line 1313
                        at Show-ADTBalloonTip<Process>, C:\Temp\MyTestPackage\PSAppDeployToolkit\PSAppDeployToolkit.psm1: line 17153
                        at Install-ADTDeployment, C:\Temp\MyTestPackage\Invoke-AppDeployToolkit.ps1: line 236
                        at <ScriptBlock>, C:\Temp\MyTestPackage\Invoke-AppDeployToolkit.ps1: line 394
                        at <ScriptBlock>, <No file>: line 1

PositionMessage       : At C:\Temp\MyTestPackage\Invoke-AppDeployToolkit.ps1:236 char:5
                        +     Show-ADTBalloonTip -BalloonTipTitle 'MyTitle' -BalloonTipText 'my ...
                        +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2025-08-28T01:57:08.3166621-07:00] [Post-Install] [Invoke-AppDeployToolkit.ps1] [Error] :: An unhandled error within [Invoke-AppDeployToolkit.ps1] has occurred.
Error Record:
-------------

Message               : Exception calling "ShowBalloonTip" with "1" argument(s): "The client process returned an exception."
InnerException        : PSADT.ClientServer.ServerException: The client process returned an exception. ---> System.TypeInitializationException: The type initializer for 'PSADT.AccountManagement.AccountUtilities' threw an exception. ---> System.ComponentModel.Win32Exception: Access is denied
                           at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
                           at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
                           at System.Diagnostics.Process.OpenProcessHandle(Int32 access)
                           at PSADT.Security.PrivilegeManager.GetPrivileges() in D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT\Security\PrivilegeManager.cs:line 113
                           at PSADT.AccountManagement.AccountUtilities..cctor() in D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT\AccountManagement\AccountUtilities.cs:line 175
                           --- End of inner exception stack trace ---
                           at PSADT.UserInterface.DialogManager.ShowBalloonTip(BalloonTipOptions options) in D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT.UserInterface\DialogManager.cs:line 259
                           at PSADT.ClientServer.ClientExecutable.ShowBalloonTip(IReadOnlyDictionary`2 arguments) in D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT.ClientServer.Client\ClientExecutable.cs:line 562
                           at PSADT.ClientServer.ClientExecutable.EnterClientServerMode(ReadOnlyDictionary`2 arguments) in D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT.ClientServer.Client\ClientExecutable.cs:line 381
                           --- End of inner exception stack trace ---
                           at PSADT.ClientServer.ServerInstance.Invoke[T](String command) in D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT.ClientServer.Server\ServerInstance.cs:line 688
                           at CallSite.Target(Closure , CallSite , Object , Object , Object )

FullyQualifiedErrorId : ServerException,Show-ADTBalloonTip
ScriptStackTrace      : at Private:Invoke-ADTClientServerOperation, C:\Temp\MyTestPackage\PSAppDeployToolkit\PSAppDeployToolkit.psm1: line 1313
                        at Show-ADTBalloonTip<Process>, C:\Temp\MyTestPackage\PSAppDeployToolkit\PSAppDeployToolkit.psm1: line 17153
                        at Install-ADTDeployment, C:\Temp\MyTestPackage\Invoke-AppDeployToolkit.ps1: line 236
                        at <ScriptBlock>, C:\Temp\MyTestPackage\Invoke-AppDeployToolkit.ps1: line 394
                        at <ScriptBlock>, <No file>: line 1

PositionMessage       : At C:\Temp\MyTestPackage\Invoke-AppDeployToolkit.ps1:236 char:5
                        +     Show-ADTBalloonTip -BalloonTipTitle 'MyTitle' -BalloonTipText 'my ...
                        +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2025-08-28T01:57:08.3796640-07:00] [Finalization] [Close-ADTInstallationProgress] [Info] :: Closing the installation progress dialog.
[2025-08-28T01:57:08.5006648-07:00] [Finalization] [Close-ADTClientServerProcess] [Info] :: Closing user client/server process.
[2025-08-28T01:57:08.7978474-07:00] [Finalization] [Close-ADTSession] [Error] :: [Microsoft_Orca_4.0.6001.0000] install completed in [9.2002274] seconds with exit code [60001].

Someone else reported this to me earlier but I've never seen it before. Can you please test out this build for me and let me know if it works any better? - Use native P/Invoke code wherever we need the current process handle. · PSAppDeployToolkit/PSAppDeployToolkit@e2a642d · GitHub

Just download the module zip file and replace your entire PSAppDeployToolkit folder with the one from the zip file. This uses some native Win32 calls instead of code from .NET's library so it gives us a bit more control.

Thank you for your quick reply. I downloaded that module, tested it and that works perfectly! :slight_smile:
Please keep us posted if that change will implemented in the next release.

Just tried to build a new package, I'm getting the same error, any ways to reupload the fix you had as the link is dead?

We'll be releasing 4.1.4 at some point this week which will include the fix.