Wait-Job behavior with timeout #10501
Labels
Issue-Bug
Issue has been identified as a bug in the product
WG-Cmdlets-Core
cmdlets in the Microsoft.PowerShell.Core module
Steps to reproduce
The code is aim to set time timeout for back ground jobs. I removed unrelated code here. The behavior is strange for me. Here is the code.
Expected behavior
Always get "WARNING: res"
Actual behavior
This code works fine and get result “Warning: res”. But if I remove L30, which is meaningless, the job always timeout while
Wait-Job
. Is this a expected behavior? Could you explain the underlying mechanisms to me?Environment data
Tested on both Windows Powershell and Powershell Core
The text was updated successfully, but these errors were encountered: