Powershell Cmdlets are not always the way to go…

Hi all,

Maybe have you already noticed that if you compare some .NET functions and their equivalent in Powershell, in term of speed you are far behind what can be achieved in .NET… An example with facts ? Of course here is one :

If you run the script above you will notice the difference, in my case I tried it against a host with a good (less than 1ms latency) and stable connection… And the result is :

TestConnection Average time : 47 ms
Ping Average time : 15,64 ms

The .NET Ping function is about 3 time faster !!! If you have to ping a lot of host, Ping is the way to go 😉
Another added value with the .NET Ping function ? You can define the “DontFragment” option which can be very handy to test link quality and adjust you MTU (Maximum transmission unit).