Console-Download 0.2.0

dotnet add package Console-Download --version 0.2.0                
NuGet\Install-Package Console-Download -Version 0.2.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Console-Download" Version="0.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Console-Download --version 0.2.0                
#r "nuget: Console-Download, 0.2.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Console-Download as a Cake Addin
#addin nuget:?package=Console-Download&version=0.2.0

// Install Console-Download as a Cake Tool
#tool nuget:?package=Console-Download&version=0.2.0                

Console-Download

A command line tool for downloading files from a passed URL list in multithreaded mode and displays the download speed in real time.

This tool is suitable for testing the network interface throughput via Looking Glass hosts in order to debug monitoring system sensors or check Internet speed. Once all files have been downloaded, the maximum, average and minimum download speeds during operation are displayed.

🚀 Install

You must have a NuGet repository registered:

Register-PSRepository -Name "NuGet" -SourceLocation "https://www.nuget.org/api/v2" -InstallationPolicy Trusted

Install the module from the NuGet package manager:

Install-Module Console-Download -Repository NuGet -Scope CurrentUser

You can import a module directly from GitHub into the current PowerShell session with a single command:

Invoke-Expression $(Invoke-RestMethod "https://raw.githubusercontent.com/Lifailon/Console-Download/rsa/module/Console-Download/Console-Download.psm1")

⏬ Start

Passing one URL to download one file to default directory (parameter Path: %USERPROFILE%\Downloads):

Invoke-Download -Url "https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/PowerShell-7.4.2-win-x64.zip"

Parallel downloading in multi-threaded mode of one file (from one URL) a specified number of times (available from 1 to 20):

Invoke-Download -Url "https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/PowerShell-7.4.2-win-x64.zip" -Thread 3

Download multiple files at once:

$urls = @(
    "https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/PowerShell-7.4.2-win-x64.zip",
    "https://github.com/Lifailon/helperd/releases/download/0.0.1/Helper-Desktop-Setup-0.0.1.exe"
)
Invoke-Download $urls

Pass a list of URLs from a file:

$urls = Get-Content "$home\Desktop\links.txt"
Invoke-Download $urls

Example result:

Thread  : 2
Time    : 00:00:23
Minimum : 0,00 MByte/sec
Average : 8,89 MByte/sec
Maximum : 51,00 MByte/sec

📶 Looking Glass Integration

The module contains the function of getting an up-to-date list of Looking Class hosts endpoints from Looking.House.

$urls = Get-LookingGlassList

You can filter the resulting list by region:

$usaNy = $urls | Where-Object region -like *USA*New*York*

Example host list for the US, New York region:

$usaNy | Format-List

region    : USA, NY, New York
url10mb   : https://191-96-196-147.lg.looking.house/10.mb
url100mb  : https://191-96-196-147.lg.looking.house/100.mb
url1000mb : https://191-96-196-147.lg.looking.house/1000.mb

region    : USA, NY, New-York
url10mb   : https://5-188-0-17.lg.looking.house/10.mb
url100mb  : https://5-188-0-17.lg.looking.house/100.mb
url1000mb : https://5-188-0-17.lg.looking.house/1000.mb

Select the desired URL by sequence number (index) and size (file size 100 mbyte):

$url = $usaNy[0].url100mb

Write-Host $url
https://191-96-196-147.lg.looking.house/100.mb

Start testing the download:

Invoke-Download $url

Thread  : 1
Time    : 00:00:10
Minimum : 0,00 MByte/sec
Average : 9,90 MByte/sec
Maximum : 14,20 MByte/sec

Use multiple threads to download one file:

Invoke-Download $url -Thread 3

Thread  : 3
Time    : 00:00:28
Minimum : 0,00 MByte/sec
Average : 12,64 MByte/sec
Maximum : 30,10 MByte/sec
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.0 110 5/28/2024
0.1.0 101 5/24/2024