PSADT Execute-Process Command Troubleshooting for Xming and Pycharm
I'm using PowerShell AppDeploymentToolkit to script the install. I'm able to use the admin command prompt to run the setup switches provided for Xming (and for Pycharm which I'm having the same problems with). I then add the following command to PSADT ver 3.8.2:
Execute-Process -Path 'Xming-6-9-0-31-setup.exe' -Parameters '/SILENT /NORESTART /ALLUSERS'
I then execute the following command from and admin command prompt
C:\Temp\Test\Xming\2>deploy-application.exe /32 -deploymode Interactive
I then get the following log file entries but nothing else happens? How do I troubleshoot this issue?
When I try to just run the script from the PowerShell ISE I get the following. I’m not sure if this is a better way to troubleshoot the issue.
PS C:\Temp\Test\Xming\2> C:\Temp\Test\Xming\2\Deploy-Application.ps1
[08-11-2020 21:47:14.063] [Initialization] [PSAppDeployToolkit] :: *******************************************************************************
[08-11-2020 21:47:14.063] [Initialization] [PSAppDeployToolkit] :: *******************************************************************************
[08-11-2020 21:47:14.224] [Initialization] [PSAppDeployToolkit] :: [Xming_6.9.0.31_x64_EN_01] setup started.
[08-11-2020 21:47:14.260] [Initialization] [PSAppDeployToolkit] :: Script [C:\Temp\Test\Xming\2\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source
invoked by [C:\Temp\Test\Xming\2\Deploy-Application.ps1]
C:\Temp\Test\Xming\2\Deploy-Application.ps1 : Module [C:\Temp\Test\Xming\2\AppDeployToolkit\AppDeployToolkitMain.ps1] failed to load:
File C:\Temp\Test\Xming\2\AppDeployToolkit\AppDeployToolkitExtensions.ps1 cannot be loaded. The file
C:\Temp\Test\Xming\2\AppDeployToolkit\AppDeployToolkitExtensions.ps1 is not digitally signed. You cannot run this script on the current system. For
more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At C:\Temp\Test\Xming\2\Deploy-Application.ps1:98 char:81
+ ... yToolkitMain -DisableLogging } Else { . $moduleAppDeployToolkitMain }
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Deploy-Application.ps1
PS C:\Temp\Test\Xming\2>
[Initialization] :: ******************************************************************************* PSAppDeployToolkit 8/11/2020 7:20:05 PM 8000 (0x1F40)
[Initialization] :: ******************************************************************************* PSAppDeployToolkit 8/11/2020 7:20:05 PM 8000 (0x1F40)
[Initialization] :: [Xming_6.9.0.31_x86_EN_01] setup started. PSAppDeployToolkit 8/11/2020 7:20:05 PM 8000 (0x1F40)
[Initialization] :: Script [C:\Temp\Test\Xming\2\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source invoked by [C:\Temp\Test\Xming\2\Deploy-Application.ps1] PSAppDeployToolkit 8/11/2020 7:20:05 PM 8000 (0x1F40)
Answers (1)
A few silly questions
- Are you running the ISE elevated?
Oh, just noticed you have this massive clue
C:\Temp\Test\Xming\2\AppDeployToolkit\AppDeployToolkitExtensions.ps1 is not digitally signed. You cannot run this script on the current system. For
more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
- Have you set your execution policy to Unrestricted? This is for testing of course.
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7
>How do I troubleshoot this issue?
- Only a suggestion, read the logs? :P