The background: I’m a PoSH enthusiast, but far from being an expert. I have a very simple PS script I run against a server that returns to me the server name, OS, last reboot time and the presence of two patches (via Get-Hotfix -id KBxxxxxxx).
I’d now like to run this script against a very large number of servers, with the names contained in a text file. I’ve managed to accomplish this by way of a foreach loop, but it can take a very long time to serially query each server. I’d like to query each server in parallel which brings me to Jobs.
The question: I can start each job, but when I receive them, it’s full of a bunch of null values. I suspect this has to do with the script writing the information to the screen (lots of Write-Hosts going on), but I’m not sure how to go about fixing it. Can anyone give me a nudge in the right direction?