Receive-Job
noun
say it: “ree-SEEV jahb” /rɪˈsiv ˌdʒɑb/
A PowerShell command that collects what a background job has printed so far, errors included, handing each line over only once.
What does Receive-Job do?
Receive-Job collects a background job's output: everything it has printed since you last asked, errors included. Each line is handed over once, so ask again later for the lines since. -Wait waits for the rest, and -AutoRemoveJob tidies the job away when it's done.
Receive-Job -Name resize | Select-Object -Last 2
Receive-Job -Name resize -Wait -AutoRemoveJob | Select-Object -Last 2
# Resized IMG_1500.jpg
In a sentence
- “Receive-Job showed that thirty-seven photos were already done.”
- “With -Wait, Receive-Job held the prompt until the last photo was resized.”
Level: Journeyman · More PowerShell terms at this level
Updated