Time for Part 2 of talking about Network Discovery, the Powershell version. Part 1 can be found here.
Great little script request came across on Spiceworks last week, something I’ve been looking forward to for a long time but never really thought I’d get a chance to do. Time to unlock the power of Remoting in Powershell and dive into true Distributed Computing–not multi-threading, but Distributed Computing!
I’m not the most patient person in the world, nor the most trusting and this has always translated itself into my scripts by giving constant feedback on what’s going on. Write-Progress is a great mechanism for doing this within Powershell as it will provide you with a cool looking progress bar, and bonus, it’s really easy to use!
In your scripting journey there will come a time that you have a script that is simply running too long. Perhaps you’re wanting to gather information hourly and the script is taking two hours to run. Maybe you’re a consultant and need a discovery script to run as fast as possible so you can get out of there? Whatever it is at some point you’ll consider multithreading. Powershell has this capability baked right into it using Powershell Jobs, but .Net has a way too, and initial testing shows it might be faster! Read on to see what I mean.