Hi Team,
I am not able to execute Invoke-CommandInDesktopPackage with Ansible (win_shell) , facing below error. please check and let me how to fix the issue.
I am running with Full access User.
Invoke-CommandInDesktopPackage
: System.UnauthorizedAccessException occurred when attempting to \r\ninvoke the
provided command in desktop package.
Run
Invoke-CommandInDesktopPackage -? for usage \r\ndetails. Additional detail:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))\r\nAt
C:\\launch.ps1:16 char:6\r\n+
Invoke-CommandInDesktopPackage \"cmd\" -Args $executable
-PackageF ...\r\n+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n
+ CategoryInfo : NotSpecified:
(:) [Invoke-CommandInDesktopPackage], UnauthorizedAcce \r\n
ssException\r\n + FullyQualifiedErrorId :
System.UnauthorizedAccessException,Microsoft.Windows.Appx.PackageCom \r\n
mands.InvokeCommandInDesktopPackage\r\n \r\nStop-Process : Cannot stop
process \"cmd (424)\" because of the following error: Windows
PowerShell \r\nis in NonInteractive mode. Read and Prompt functionality is not
available.\r\nAt C:\\launch.ps1:19 char:6\r\n+ Stop-Process
-Name CMD\r\n+ ~~~~~~~~~~~~~~~~~~~~~~\r\n +
CategoryInfo : CloseError:
(System.Diagnostics.Process (cmd):Process) [Stop-Process \r\n ],
ProcessCommandException\r\n + FullyQualifiedErrorId :
CouldNotStopProcess,Microsoft.PowerShell.Commands.StopProcessCommand",