Summary: Learn how to stop an unwanted Windows PowerShell job.
How can I stop an over-running Windows PowerShell job?
Even though this is not something you’d normally do, creating an infinite loop is a common (and
potentially, very embarrassing) error. This job will run forever:
Start-Job -ScriptBlock {while ($true){sleep -Seconds 10}}
When you realize that your job is over-running, use the Stop-Job cmdlet:
Stop-Job -Id 14
You can then hide the evidence by using Remove-Job to delete the job.
You can test the data in the stopped job with Receive-Job, if desired, before you delete the job.