Relative Content

Tag Archive for powershellpowershell-jobs

Powershell job behavior when using Start-Sleep with a variable rather than a hardcoded value

I am having trouble in deciphering what is going on with the powershell excerpt below.
Running it using a hardcoded value instead of $timeoutInSecs variable – works as expected (see output at the bottom). However, if I try to set Start-Sleep using a parameter carrying the very same value – the script always complete stating the created job has already completed.