<# .SYNOPSIS PowerShell script to get infomation of Microsoft Edge for Enterprise. .DESCRIPTION This script use non public of Microsoft Edge for Enterprise release infomation, and get available udpates information. .INPUTS The script takes Channel, Platform, Windows, Archtecture, Version. .OUTPUTS return table .EXAMPLE # Get download info of Microsoft Edge Stable current version for Windows x64. .\get-msedgebiz.ps1 -Channel "Stable" -Platform "Windows" -Architecture "x64" -Version "Current" .EXAMPLE # Get download info of Microsoft Edge Stable current version for Windows x64 , and download it. $result = .\get-msedgebiz.ps1 -Channel "Stable" -Platform "Windows" -Architecture "x64" -Version "Current" $filename = Split-Path $result.Url -Leaf curl.exe -L --fail --retry 3 --retry-delay 2 -o (Join-Path $env:userprofile\downloads $filename) $result.Url or $ProgressPreference = 'SilentlyContinue' ; Invoke-WebRequest -Uri $result.Url -OutFile (Join-Path $env:userprofile\downloads $filename) ; $ProgressPreference = 'Continue' .NOTES This script is a sample. Use it at your own risk. #> param ( [string]$Channel = "*", #Dev|Beta|Stable|EdgeUpdate|Policy|*(default) [string]$Platform = "*", #Windows|MacOS|Linux|*(default) [string]$Architecture = "*", #x64|x86|arm64|*(default) [string]$Version = "*" #Current|x.x.x.x|*(default) ) $msedgebizapi = "https://edgeupdates.microsoft.com/api/products?view=enterprise" $ret = Invoke-RestMethod -uri $msedgebizapi $rows = foreach ($product in $ret) { foreach($release in $product.Releases) { foreach($artifact in $release.Artifacts) { [pscustomobject]@{ Channel = $product.Product Version = $release.ProductVersion Platform = $release.Platform Architecture = $release.Architecture Url = $artifact.Location Hash = $artifact.Hash HashAlgorithm = $artifact.HashAlgorithm SizeInBytes = $artifact.SizeInBytes PublishedTime = $release.PublishedTime } } } } if ($rows.Count -ne 0) { if ($Version -eq "Current") { $rows | Where { ($_.Channel -like $Channel) -and ($_.Platform -like $Platform) -and ($_.Architecture -like $Architecture) } |Sort-Object @{ Expression = { [version]$_.Version } } -Descending |Select-Object -First 1 } else { $rows | Where { ($_.Channel -like $Channel) -and ($_.Platform -like $Platform) -and ($_.Architecture -like $Architecture) -and ($_.Version -like $Version)} |Sort-Object @{ Expression = { [version]$_.Version } } -Descending } } else { Write-Host "Error: something went wrong!" }