Sunday, June 22, 2025
HomePowershellMeasure Hyperlink Pace (Bandwith) with PowerShell – SID-500.COM

Measure Hyperlink Pace (Bandwith) with PowerShell – SID-500.COM


PowerShell

Lately I’ve been engaged on a script which ought to verify the obtain pace. With PowerShell in fact. I want to share it right here.

The Code

Right here is my code for colleting details about my obtain pace and my hyperlink pace.

Enter the URL of the file to obtain and supply the placement of the downloaded file.

$File="https://patrick6649.information.wordpress.com/2022/08/lektion18.mp4"
$Location = Be a part of-Path -Path $House -ChildPath "Downloadslektion18.mp4"

$time = Measure-Command {
    Begin-BitsTransfer -Supply $File -Vacation spot $Location 
    
} | Choose-Object -ExpandProperty TotalSeconds

$filesize = (Get-ChildItem -Path $HomeDownloadslektion18.mp4).Size/1MB

$Pace = ($filesize / $time) * 8

Write-Output "Community Pace: $([math]::Spherical($Pace,2)) Mbit/sec"

Brief rationalization: A file can be downloaded from my homepage. It’s a video about Powershell Profiles in German language. In the course of the obtain of the file the method is measured with the Measure-Command cmdlet. On the finish we get the ultimate end result and the time it took to obtain the file.

Credit

Credit goes to the creator of this weblog posts who sparks the concept in to put in writing this script.

https://www.joakimnordin.com/is-it-possible-to-check-the-internet-performance-at-a-clients-network-using-powershell/

Have enjoyable measuring your obtain pace.

Printed by Patrick Gruenauer

Microsoft MVP on PowerShell [2018-2023], IT-Coach, IT-Guide, MCSE: Cloud Platform and Infrastructure, Cisco Licensed Academy Teacher.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments