I am now on version 2 of this project. I am trying to get it to run faster. I have cut the time by a little more than half per server to about 2 minutes. I started reading about Multithreading the script but have destroyed every iteration attempt. I am obviously missing a subtlety somewhere of this process. Below is my working version of version 2. I could use some help so that I can cut the time down. This morning I had 12 servers to run health checks on after patching and it to a little over 30 minutes. I know it is because it is doing one server at a time.
Powershell
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Variable Declarations >################################HTml Report Content############################$Style=" BODY{background-color:#b0c4de;} TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;} TH{border-width: 1px;padding: 3px;border-style:...<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Variable Declarations >