Fun with PowerShell Asynchronous
Imagine a candle that is lit and takes 1 hour to burn out. Now imagine one hundred candles. How many hours will it last? That depends. If they are lit simultaneously, it will take 1 hour. That is the basic idea of running in the background or asynchronously. Of course, the 100 candles can execute independently of one another, unlike if you try to run 100 processes on a computer with 2 cores. PowerShell has some ways to manage that, as PowerShell job – which we will see in this article – runspaces – needs to add programmable using .net.
2025-02-14