Thursday, May 5, 2016

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


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.