Fan-Out Performance Without Remoting

less than 1 minute read

After my last post on PowerShell Remoting performance, I received an email asking if I had tried Split-Job. It works by creating multiple runspaces so that a single command can be run against multiple computers in parallel without remoting enabled. The MaxPipelines parameter controls the number of simultaneous runspaces. I gave the function a try against a group of 100 computers similar to those used in my earlier tests. While it doesn’t quite have the speed or efficiency of Invoke-Command, it’s a great alternative if remoting isn’t an option in your environment. Tome Tanasovski tackled the problem by using PowerShell jobs in his Start-ComputerJobs function, but I haven’t had the opportunity to try it out.

$computers | Split-Job -MaxPipelines 20 { % {Get-WinEvent -FilterHashtable @{logname="security";id=4624} -MaxEvents 20 -ComputerName $_} }