1. Start-Job -Name SleepbgJob -ScriptBlock {Start-Sleep -Seconds 60; Get-Process}
Start a job in the background with the name "SleepbgJob" that sleeps for 60 seconds and run the command Get-Process.
2. Get-Job
This command will show all the background jobs started with their ID
3. Get-Job -Id <job id number eg: 10>
This command will show detailed information about a particular job id.
4. Receive-job -id <job id number eg: 10> -keep
This command will show the output from the jobs (Get-Process in the above example)
5.Get-job | remove-job
This will remove all the background jobs from the list.
6. Start-Job -Name WaitforJobtoFinish -ScriptBlock {Start-Sleep -Seconds 10} | Wait-Job
This command will wait for the job to finish.
7. Get-Job -state Running
8. Get-Job -state Failed
9. Remove-Job -State Failed