Powershell: Check the Internet Accessibility for Multiple Computers

Sometimes, you need to make sure all your servers have internet access or not, especially after network change or for monthly auditing purpose. With powershell, you can achieve this by using .Net call to sockets. And, I found the script on this site to work as a baseline and use Mr. stevethethread’s code to colorize the output.  You will need to save the list of servers in Server.txt in the same directory as script, and change the port number in the script as needed.

Note: Powershell Remoting must already be enabled on those servers and if not, I have written a blog post here on how to enable it.

Fig-1: Checking Internet Connection on multiple servers

You can download my script from github.

This entry was posted in Powershell. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *