Skip to content

Instantly share code, notes, and snippets.

@aollivierre
aollivierre / Benchmark-Download-PS7.ps1
Created June 30, 2024 14:20
Benchmark-Download-PS7
param (
[switch]$VerboseOutput
)
# Define the URL for the latest PowerShell 7 release
$url = (Invoke-RestMethod https://api.github.com/repos/PowerShell/PowerShell/releases/latest).assets |
Where-Object { $_.name -like '*win-x64.msi' } |
Select-Object -ExpandProperty browser_download_url
Write-Host "Downloading PowerShell from $url"