Everyone’s always telling you to multitask, right? Why shouldn’t PowerShell help you with that by doing more than one thing at a time? It turns out that PowerShell can do exactly that, particularly for longer-running tasks that might involve multiple target computers. Make sure you’ve read chapter 13 before you dive into this chapter, because we’ll be taking those remoting concepts a step further.
Heads Up
You should think of PowerShell as a single-threaded application, meaning that it can do only one thing at a time. You type a command, you press Enter, and the shell waits for that command to execute. You can’t run a second command until the first command finishes.
But with its background jobs functionality, PowerShell has the ability to move a command onto a separate background thread or a separate background PowerShell process. That enables the command to run in the background as you continue to use the shell for another task. You have to make that decision before running the command; after you press Enter, you can’t decide to move a long-running command into the background.