This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |