Fast Ping Sweep Asynchronous

 I have seen most of the Powershell IP scanner, ping sweeping scripts but none of them uses the PingASync method.The "problem" with synchronous scripts is that they have to wait until a node replies or times out before continuing to the next address.Using this approach may take s

Ping-IPrange.ps1
 
 
 
 
 
4.5 Star
(11)
8,626 times
Add to favorites
Networking
8/30/2014
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • please help, I couldn't get it working
    6 Posts | Last post April 24, 2014
    • I tried the following way, no luck...
      
      .\Ping-IPRange.ps1 -StartAddress 192.168.16.1 -EndAddress 192.168.16.254 -Interval 10
      
      although I tried with a valid IP address, it doesn't work, too.
      
      .\Ping-IPRange.ps1 -StartAddress 192.168.16.2 -EndAddress 192.168.16.2 -Interval 10
      
      
      am I missing anything?
    • Hi Ice-cream,
      
      The script just loads a function called Ping-IPRange.
      To use it open powershell or powershell-ice and run the script once and then call the function on the command line.
      
      for example:
      
      C:\Scripts\> .\Ping-IPRange.ps1
      
      C:\Scripts\> Ping-IPRange -Start 192.168.16.1 -End 192.168.16.254 -Int 10
      
      For more information on how to use or make functions go to https://blogs.technet.com/b/heyscriptingguy/archive/2013/04/09/using-powershell-functions-best-practices.aspx
      
      
      
      
    • My previous answer was to short, the easiest way to use the script is to open it in Powershell-ISE, run the script an then run the command.
      I will try modify the script to make it work with script arguments.
    • Thanks gaff, I got it working after reading your reply. I actually some interesting idea, but I am unsure if that will even work.
      
      It is quite usual to see an undocumented network environment. There are PING sweep & SNMP sweep can help for discovery work.
      
      If that happen to be a non unified environment, it can be quite painful to multiple SNMP sweep with different community strings, and consolidate the output.
      
      What I am thinking is to define a list of possible community string. After detecting an IP, do a SNMP query and confirm which string works, and output to an extra column  listing the working string.
      
      This can potentially expand to every make SNMP query on a known OID that will return the device name or description, becoming another column.
      
      I would love to hear your comment, Thanks
    • Doing a SNMP query would be a nice feature but it will take a lot of work.
      Many scripters took up the challenge but, as far as I can see, no one has managed to come up with a script that can do it without the help of an external piece of code.
      
      Nevertheless I will it a try to come up with a simple solution.
    • Thank you for sharing that code.
      I would like to suggest that you post this in the gallery so other users can find it.
11 - 11 of 11 Items