5 lines of code to run Speedtest from Command Line
There are instances, where you need to run a Speedtest to check Internet speeds. The speedtest.net website is getting overly crowded with ads and sometimes may not reflect true speeds.
I have found an easy way to do it from command line.
md c:\temp powershell "wget 'https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-win64.zip' -outfile c:\temp\speedtest.zip" powershell "wget 'http://stahlworks.com/dev/unzip.exe' -outfile c:\temp\unzip.exe" c:\temp\unzip c:\temp\speedtest.zip -d c:\temp c:\temp\speedtest --accept-license
This works on Windows 7 and up. First we are making sure c:\temp folder exists, then we are downloading Speedtest CLI and Unzip. Extract the files and run the test. If you have Windows 10 or above, you can use alternative ways to extract too, just replace line 3 and 4 with:
tar -xf c:\temp\speedtest.zip -C "c:\temp"
Works like a charm.