Abstract
If you ever need to run a task in the background or have multiple smaller tasks that you want to run in parallel, you can use PowerShell jobs. Jobs are blocks of code that run in their own PowerShell instance, and you can retrieve the output at any point and even stop the job when required. Let’s say you need to write a script that needs to connect to all computers on a network and retrieve their operating system version to build a report. Doing this task individually could take a very long time, but if you could run ten of these tasks at once, you can greatly reduce the overall amount of time that report would take to run. I do this type of task along with others such as connecting to multiple Microsoft and Google cloud services to retrieve report information for our business clients. Running the tasks as individual background jobs takes a fraction of the time.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2021 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature
About this chapter
Cite this chapter
Waters, I. (2021). Background Processing. In: PowerShell for Beginners. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-7064-6_15
Download citation
DOI: https://doi.org/10.1007/978-1-4842-7064-6_15
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-7063-9
Online ISBN: 978-1-4842-7064-6
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)