This PowerShell script runs Speedtest.net's Speedtest CLI from the command line. No need to browse to a website or unzip files, it does it all for you. Arguments are passed through to the CLI, so you arguments as you normally would.
Note
This package nor its author are affiliate with Ookla or Speedtest.net. It is simply a wrapper around their CLI.
- Scrapes Speedtest CLI download page for the latest version
- Downloads the latest version
- Unzips the file
- Runs the speedtest.exe file
- Cleans up the files
Warning
Your use of this script constitutes acceptance of EULA, Terms of Use, and the Privacy Policy. The script will automatically accept these on your behalf via CLI using --accept-license
and --accept-gdpr
. Please do not use the script if you do not agree.
License information is available by running the speedtest.exe
without any arguments (not this script but the actual executable). Text may not appear for users in the United States.
You may only use this Speedtest software and information generated
from it for personal, non-commercial use, through a command line
interface on a personal computer. Your use of this software is subject
to the End User License Agreement, Terms of Use and Privacy Policy at
these URLs:
https://www.speedtest.net/about/eula
https://www.speedtest.net/about/terms
https://www.speedtest.net/about/privacy
Ookla collects certain data through Speedtest that may be considered
personally identifiable, such as your IP address, unique device
identifiers or location. Ookla believes it has a legitimate interest
to share this data with internet providers, hardware manufacturers and
industry regulators to help them understand and create a better and
faster internet. For further information including how the data may be
shared, where the data may be transferred and Ookla's contact details,
please see our Privacy Policy at:
http://www.speedtest.net/privacy
Please note this package nor its author are affiliate with Ookla or Speedtest.net. It is simply a wrapper around their CLI.
The URL asheroto.com/speedtest always redirects to the latest code-signed release of the script.
Simply run this command with PowerShell.
irm asheroto.com/speedtest | iex
Due to the nature of how PowerShell works, passing arguments to the script is a bit harder. To do it as a one-line command, you can run this:
iex "& { $(iwr asheroto.com/speedtest) } --servers"
Or if you download the latest version, you can run it like this:
.\speedtest.ps1
You can also run this command with Command Prompt by having it run PowerShell.
powershell -c "irm asheroto.com/speedtest | iex"
Due to the nature of how PowerShell works, passing arguments to the script is a bit harder. To do it as a one-line command, you can run this:
powershell -c "iex ""& { $(iwr asheroto.com/speedtest) } --servers"""
Or if you download the latest version, you can run it like this:
powershell -c ".\speedtest.ps1"
You can use --help
to see the parameters available in the Speedtest CLI.
Speedtest by Ookla is the official command line client for testing the speed and performance of your internet connection.
Version: speedtest 1.2.0.84
Usage: speedtest [<options>]
-h, --help Print usage information
-V, --version Print version number
-L, --servers List nearest servers
-s, --server-id=# Specify a server from the server list using its id
-I, --interface=ARG Attempt to bind to the specified interface when connecting to servers
-i, --ip=ARG Attempt to bind to the specified IP address when connecting to servers
-o, --host=ARG Specify a server, from the server list, using its host's fully qualified domain name
-p, --progress=yes|no Enable or disable progress bar (Note: only available for 'human-readable'
or 'json' and defaults to yes when interactive)
-P, --precision=# Number of decimals to use (0-8, default=2)
-f, --format=ARG Output format (see below for valid formats)
--progress-update-interval=# Progress update interval (100-1000 milliseconds)
-u, --unit[=ARG] Output unit for displaying speeds (Note: this is only applicable
for ΓÇÿhuman-readableΓÇÖ output format and the default unit is Mbps)
-a Shortcut for [-u auto-decimal-bits]
-A Shortcut for [-u auto-decimal-bytes]
-b Shortcut for [-u auto-binary-bits]
-B Shortcut for [-u auto-binary-bytes]
--selection-details Show server selection details
-v Logging verbosity. Specify multiple times for higher verbosity
--output-header Show output header for CSV and TSV formats
Valid output formats: human-readable (default), csv, tsv, json, jsonl, json-pretty
Machine readable formats (csv, tsv, json, jsonl, json-pretty) use bytes as the unit of measure with max precision
Valid units for [-u] flag:
Decimal prefix, bits per second: bps, kbps, Mbps, Gbps
Decimal prefix, bytes per second: B/s, kB/s, MB/s, GB/s
Binary prefix, bits per second: kibps, Mibps, Gibps
Binary prefix, bytes per second: kiB/s, MiB/s, GiB/s
Auto-scaled prefix: auto-binary-bits, auto-binary-bytes, auto-decimal-bits, auto-decimal-bytes