Periodically Check PowerShell Job Status

My PowerShell profile starts a load of PowerShell jobs when I'm running as Administrator...

Sometimes I need to know when those jobs have finished.

Here's a lovely little infinity loop giving me just that information.


 while ($true) {Write-Output " "; start-sleep 10; get-job; write-output " "}

Here's what it comes back with...

Comments (1)

  1. My personal usage of your good idea:

    while ((Get-Job -State Running).count -ge 1) {Write-Output ” “; start-sleep 10; get-job; write-output ” “}

    Thanks again for sharing!

Skip to main content