Rexxer

Some tips for me and other

Powershell + Time elapsed

$sw = [Diagnostics.Stopwatch]::StartNew()
ping -l 10 192.168.2.2
$sw.Stop()
$sw.Elapsed
$res = “Elapsed: ” + $sw.Elapsed.Hours + ” hours ” + $sw.Elapsed.Minutes + ” minutes ” + $sw.Elapsed.Seconds + ” seconds”
echo $res

Comments are currently closed.