Skip to main content
3 events
when toggle format what by license comment
Apr 5 at 2:02 comment added Vomit IT - Chunky Mess Style Also, I used the value of target from the list being iterated in the loop to display the target being pinged. I interpreted that as the list may have IP or DNS name, so that matches what is in the target for objects that can be pinged. For the line where they are pingable, I also played with this a bit to get back the IP so if the list pings DNS name, this will show the IP rather than name defined in the list as the target If($p -match "Reply from"){"$($p.split()[2].replace(':','')),$($p.split('=')[2].replace('TTL','').Trim())"}. You can play with that in case it helps too.
Apr 5 at 1:58 comment added Vomit IT - Chunky Mess Style @ChadDye .... I will add that this approach is also not "particularly elegant or groundbreaking" but it may suffice for your specific needs while allowing the use of the ping command as you desire.
Apr 5 at 1:52 history answered Vomit IT - Chunky Mess Style CC BY-SA 4.0