15
Asynchronous Processing
PowerShell prefers to run things synchronously, that is, sequentially, or one after another. However, it is frequently necessary to run many things simultaneously, without waiting for another command to complete. This is called an asynchronous operation.
Operations of this nature may be local to the current machine or might run queries or code against remote systems. Chapter 14, Remoting and Remote Management, showed how Invoke-Command can be used to run a script simultaneously against a set of remote computers.
PowerShell includes several different commands and classes that can be used to do more than one thing at a time. The most obvious of these are the job commands.
In addition to the job commands, PowerShell can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access