79247758

Date: 2024-12-03 13:22:47
Score: 0.5
Natty:
Report link

After fiddling, I found that this works

$job = Start-Job -ScriptBlock { ....
$null = Wait-Job $job | Out-Null
$output = Receive-Job $job -Wait -AutoRemove | Out-Null
$job = $null | Out-Null

note I had to restart the PS editor many times since it does not always take the modifications (VS Code or integrated PS editor)

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: pf12345678910