Delay after Invoke Powershell

The Invoke Powershell activity does not have a delay after property, so we are currently using a hard coded delay activity which is throwing a warning in analyzer. What are some alternatives so that we can get rid of the hard coded delay?

image

If the Invoke PowerShell activity launches a process and you want to wait for that process to complete, you can use the WaitForExit method. After invoking the PowerShell script, use the WaitForExit method to wait for the process to finish before proceeding with the next activities.

// Assuming you've stored the process from Invoke PowerShell in a variable named process
process.WaitForExit();

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.