Powershell background Jobs

Run about_Jobs  for info

Jobs a run as children of the powershell session, so if the session goes, the jobs goes.

Get-command -noun job  lists commands relating to running jobs

Can either run a scriptblock if quotes in curly brackets, like this…

or a script file

 

Get-Job  lists all jobs with Status.

HasMoreData means there is resulting data that can be retrieved

Don’t forget -Keep!

This keeps the data with the job whilst also retrieving it. Or you can assign the result to a variable:

Get-Job -IncludeChildJobs  gives more details about sub-jobs, e.g. is a job ran on multiple computers.