The Power of Ping, and how to ping all computer names
If there is one thing I’ve learned throughout my IT career, you might come across a point that you want to ping all computer names. Ping is single handly the greatest support tool you might have in your arsenal. While it is so simple, yet it so powerful.
Basically to sum up Ping is that it is verifying a connection or a reply from another device, or that they are “talking” is a word thrown around quite a bit in the IT world.
While there are literally thousands of different ping tools out there let’s focus on a few that I usually use on a daily basis.
1. Command prompt “cmd.exe”
I’m sure everyone has probably heard of going to command prompt, you can open it right now if you are using a windows based operating system. Simple go to start and type CMD.
Now type ping, and ping whatever you want! Heck, you can even ping www.google.com if you want.
Now you just verified you can connect to Google! You also learned the real IPV4 address of Google! Neat huh?
Now Command prompt is great whenever you need to ping like 1 device at a time. But, let’s say you were trying to discover a device on your network or needed to ping a group of IP addresses all at once. This is the tool you want to use, you can literally scan every single private IP address on your network to see if something replies it might even come back with a name given you an edge on troubleshooting that you need.
3. Powershell Scripts
This one is sort of cheating, as it doesn’t really just focus on ping. Powershell can also specific things in your environment. Today I discovered I needed specific IP addresses from one of my Active Directory Organizational Unit placed in a neat CSV file to which I could manipulate to my liking.
I discovered this script.
This script is awesome. It will ping every computer name in your OU that you need. The only trouble with this script was that it came with no instructions on how to really use it.
Let’s take a look at Line 4
This is where stuff got a bit confusing. I’m no Powershell expert, by far actually. So I had to figure out what this really wanted. Obviously, it wants the OU name but what else.
Through my troubleshooting, I discovered this is what the “Distinguished path” in your attribute editor. You can find this in Active Directory Users and Computers.
Simply go to your OU(Organizational Unit)That you are wanting to gather the IP addresses from. Right click and go to properties. Click the Attribute Editor Tab.
You will now see the distinguishedName double click on it.
Now you can copy everything, paste this in between the quotation marks.
Time to make sure you have a path for the script to create a CSV file. (This file will contain the data which you will be allowed to manipulate with excel to get what you need.)
Line 2 is the path to which the CSV will be created.
Be sure that this folder is created on your C:\ beforehand, or you can change this to whatever folder you would want it to be created.
Me personally, I don’t change paths as I like to like the scripts alone as much as possible. This one seems simple enough you could edit it to wherever you wanted. Just make sure the folder is already created or you will receive an error.
Hopefully now you can ping all computers names without an issue!
The All-Powerful Ping
Hopefully, this helped someone out there on the world wide web. Ping is a fantastic tool and when used properly can make your life a lot easier if you know the proper ways to use it.