Even windows to windows execution, it is giving below error, does 
Invoke-CommandInDesktopPackage don't work through remote execution.

Invoke-CommandInDesktopPackage : A specified logon session does not exist. 
It may already have been terminated. \r\n(Exception from HRESULT: 
0x80070520)\r\nAt line:10 char:1\r\n+ Invoke-CommandInDesktopPackage 
\"cmd\" -Args $executable -PackageFamily ...\r\n+ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n   
 + CategoryInfo          : NotSpecified: (:) 
[Invoke-CommandInDesktopPackage], COMException\r\n    + 
FullyQualifiedErrorId : 
System.Runtime.InteropServices.COMException,Microsoft.Windows.Appx.PackageCommands.Invok
 
\r\n   eCommandInDesktopPackage




On Monday, March 30, 2020 at 9:43:38 AM UTC+5:30, Raviteja Jinkala wrote:
>
> 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",
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/cbde512f-1306-4d7f-be4d-55c00d55e1d6%40googlegroups.com.

Reply via email to