concept child job in category powershell

appears as: child jobs, child job, child jobs
Learn PowerShell in a Month of Lunches

This is an excerpt from Manning's book Learn PowerShell in a Month of Lunches.

Sharp-eyed readers will note that the first job we created is named Job1 and given the ID 1, but the second job is Job3 with ID 3. It turns out that every job has at least one child job, and the first child job (a child of Job1) is given the name Job2 and the ID 2. We’ll get to child jobs later in this chapter.

PowerShell in Depth, Second Edition

This is an excerpt from Manning's book PowerShell in Depth, Second Edition.

11.1.3. Working with child jobs

Every job consists of a top-level parent job and at least one child job. Jobs that target multiple computers will have one child job per targeted computer. To examine the child jobs, you’ll need the ID or name of the top-level job. For example:

PS C:\> Get-Job

Id Name         PSJobTypeName State     HasMoreData Location   Command
-- ----         ------------- -----     ----------- --------   -------
6  Job6         BackgroundJob Completed True        localhost  get-event...
12 ServiceCheck RemoteJob     Completed True        win8,l...  get-servi...

PowerShell v3 added parameters to make it easier to work with child jobs. It’s easy to see all the jobs at once by using –IncludeChildJob: