|
Networking Use this board for problem solving and the discussion of Networking, router, and Wi-Fi issues |
![]() |
|
Topic Tools |
#1
|
|||
|
|||
Getting PINGed Results Sortable/Filtered
I am trying to figure a way to make a simple, sortable or filterable ping script. I got a few, meh, thousand servers I need to ping. Now, I can have them all in a file. I can execute it from Command Prompt or Powershell for it to ping everything and append to a file. The problem is the output. Just comes out like regular ping results, since, well, I am using ping. So whether I run
ips.txt: server1 server2 from Command Prompt: C:\Users\me>for /f "tokens=1" %a in (c:\temp\ips.txt) DO @ping -n 3 %a >> c:\temp\PingResults.txt Or ips.ps1: ping server1 -n 2 >> “c:\temp\IP_Results.txt" ping server2 -n 2 >> “c:\temp\IP_Results.txt" (or even if CSV is the output) In Powershell: Pings are all complete results located in c:\temp\IP_Results.txt. PS C:\WINDOWS\system32> & C:\temp\IP_Results.ps1 Both give me the same results in the outputted file, which I know is expected of ping. Pinging server1 [10.111.123.248] with 32 bytes of data: Request timed out. Request timed out. Ping statistics for 10.111.123.248: Packets: Sent = 2, Received = 0, Lost = 2 (100% loss), Pinging server2 [10.111.123.249] with 32 bytes of data: Request timed out. Request timed out. Ping statistics for 10.111.123.249: Packets: Sent = 2, Received = 0, Lost = 2 (100% loss), Fine and dandy. What I would really like is to have all the servers in an output that shows me at least three key bits of info I need, like: Server1, 10.1.1.2, inactive/time out/whatever Server2, 10, 2, 3, 4, active/pinged/whatever I want to be able to have it all into a list so I can at least, like in a spreadsheet, filter out all the ones that failed knowing what their server names and IPs are, so I can work on those. Rather than having to go through the generic ping results like above for 2000 results. Know what I mean? Thanks. |
![]() |
Bookmarks |
«
Previous Topic
|
Next Topic
»
Topic Tools | |
|
|
![]() |
||||
Topic | Topic Starter | Forum | Replies | Last Post |
On the results from... | Mr Bean | Malware Removal | 13 | June 9th, 2009 02:13 AM |
AVG results | #ELMO# | Malware Removal | 3 | May 10th, 2007 12:39 PM |
How Do you unblock a site that has been filtered | lauriem0 | Windows NT, 2000, 2003, 2008, 2012 | 4 | December 16th, 2005 01:49 AM |
Bad results. | dickster | Windows XP | 2 | July 17th, 2002 12:49 AM |
All times are GMT +1. The time now is 11:05 AM.