I use this function when I’m writing scripts that will
take information from Servers and Clients when
they are on the network.
function Ping-Status { ######################################################################## # Ping-Status function # Created: 2009-07-21 # By: Fredrik Wall, fredrik[dot]wall[at]riverpoint[dot]se ######################################################################## param ($mysrv) $pingstatus = Get-WmiObject -Query "SELECT StatusCode FROM win32_PingStatus WHERE ADDRESS = '$mysrv'" if ($pingstatus.StatusCode -eq 0) { $true } else { $false } }
No related posts.
RT @walle75 Ping-Status function | Fredrik Wall http://bit.ly/xBmCc
Nice function, but it would be even nicer if you could determine packetsize and control the “do not fragment-flag”.