We’ve all been there — the pain of waiting for a page to load when it should have taken a millisecond, is very real. And then there’s the trial and error. Is it the router that’s causing the problem? The internet service provider? Maybe the computer just needs a restart.
Well, now you can remove the guesswork behind a slow connection with this useful internet speed test script. The script utilizes the Speedtest CLI by Ookla to measure internet connection performance metrics like download, upload, latency, and packet loss without relying on a web browser. This way, you can swiftly analyze and troubleshoot internet connectivity issues on your end user devices.
The script works by downloading the Speedtest CLI from the Ookla website, extracting and executing the file, and then displaying the results in your console. Once the script is executed, it will automatically delete the downloaded files and speedtest result stored in a text file.
The Script:
Atera does not guarantee the integrity, availability, security, virus-free, safety, lawfulness, non-infringement, rights’ status, or functionality of the scripts. The use of the shared scripts is at your own risk. Scripts are provided “AS IS”. *
$URL = "https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-win64.zip"
$output = "$env:TEMP\speedtest.zip"
$exe = "$env:TEMP\speedtest.exe"
$md = "$env:TEMP\speedtest.md"
$results = "$env:TEMP\Test.txt"
$params = "--accept-license --progress=no"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri $URL -OutFile $output -Headers @{"Cache-Control"="no-cache"}
Expand-Archive -Path $output -DestinationPath "$env:TEMP\" -Force
# Runs Speedtest and outputs to a text file
Start-Process -FilePath $exe -ArgumentList $params -Wait -RedirectStandardOutput $results -WindowStyle Hidden
Get-Content $results
# Remove leftover files from program
Remove-Item -Path $output -Force
Remove-Item -Path $exe -Force
Remove-Item -Path $md -Force
Remove-Item -Path $results -Force
Technical Notes:
- Admin permissions needed to run this script.
- The URL on line 1 of the script may need to be updated when new versions of Speedtest CLI by Ookla are released. You can find the latest versions here