Netstat Results Gatherer

Ever plan on decommissioning a server, but want to make sure it isn't used by anything on the network anymore? We do that all the time so I created this simple little script and put it in a scheduled task to gather all connections to/from a server every five minutes. Before we rebuild a production server I run this for a week or so...then download the results to Excel and parse it out to find connections. Suggestions/Improvements welcome....enjoy!

Source Code

This script has not been checked by Spiceworks. Please understand the risks before using it.