Intune-Proactive-Remediation-scripts icon indicating copy to clipboard operation
Intune-Proactive-Remediation-scripts copied to clipboard

Exception calling "Show" with "1" argument(s): "Access is denied. (Exception from HRESULT: 0x80070005

Open christianbwg opened this issue 11 months ago • 0 comments
trafficstars

I'm trying to run this as a script via the Action1 platform but it is failing with an access denied message. I can run the script as a standard user, but even if I run a cmd window as local admin and call the script, it fails.

Here is a copy of the error:

Name                           Property
----                           --------
command
Exception calling "Show" with "1" argument(s): "Access is denied. (Exception from HRESULT: 0x80070005
(E_ACCESSDENIED))"
At C:\temp\RebootToaster.ps1:195 char:1
+ [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotif ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : UnauthorizedAccessException

Has anybody else come across this?

christianbwg avatar Dec 19 '24 15:12 christianbwg