Forum Discussion
Oct 26, 2021
Invoke-CommandInDesktopPackage needs a -Wait parameter
When scripting in PowerShell, I find it necessary to start a process inside a package and wait for it to finish before continuing on.
The Invoke-CommandInDesktopPackage returns immediately with...
Oct 28, 2021
Waiting is the minimum requirement, but having access to the exit code of the command is desired. My preference is to just wait rather than loop on a handle. But there might be others that want the full control to monitor and take parallel action I suppose.
The use is a substitution for starting a process. I have found it necessary to use this method to get cmd scripts to run inside of the container and I need this command to complete prior to an additional action. As I don't have control over the contents of the cmd script, I cannot add the additional action there.
Roy_MacLachlan
Microsoft
Nov 17, 2021