Pinging a Server from a Server you are not logged in to

I recently had a unique situation in which I needed to see if 4 different servers could ping a specific IP Address. Very often, we use win32_pingstatus to see if a remote machine is responding or not. But in this case, I needed to know if a remote machine could ping another remote machine. Routing was actually set up so that I could not ping the second remote machine from my laptop.

What’s cool is that you can use the –computername parameter in get-wmiobject when you look at win32_pingstatus.

image

I did change the name in a text editor to remote1 just for the sake of demo and public screen shots.

So if you wanted server remote1 to ping server remote3 you could do something like this:

Get-WmiObject Win32_pingstatus –filter “Address =’remote3’” –computername remote1.

Comments are closed