Aaron Kincer

My feedback

  1. 2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 comments  ·  PowerShell » PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Aaron Kincer commented  · 

    This seems to be fixed after recent testing. Not sure which update fixed it.

    An error occurred while saving the comment
    Aaron Kincer commented  · 

    Using process explorer, I discovered that if I kill the sub-process that was spun up when it hung the parent thread takes off again. So it looks like it's happening during the spinning up of the Powershell instance it's creating.

    Also -- I'm not really able to recreate this on a Windows 2008 box with WMF 5.1 installed. The Powershell versions are slightly different though, so not sure if there's a bug fix for this between versions or if it's completely specific to 2016.

    WMF 5.1 2008 PS Version -- 5.1.14409.1005
    WMF 5.1 2016 PS Version -- 5.1.14393.3053

    An error occurred while saving the comment
    Aaron Kincer commented  · 

    Here's a code block that I can run and reliably have Powershell stop. It never stops at the same place. Sometimes in the first few jobs and sometimes much later.

    $ScriptBlock = {
    $test = "blah"
    }
    $arguments = "Whatever args you want"
    for ($j = 1; $j -lt 200; $j++)
    {
    Write-Host "Starting job $j"
    Start-Job -Name "Job_$j" -ScriptBlock $ScriptBlock -ArgumentList $arguments
    Write-Host "Finished starting job $j"
    Start-Sleep 1
    $jobs = Get-Job
    while ($jobs.Count -ge 6)
    {
    Get-Job | Remove-Job
    Start-Sleep 1
    $jobs = Get-Job
    }
    }

    Aaron Kincer shared this idea  · 

Feedback and Knowledge Base