From 3aea5817e7a7a1bf834a44f1363b2d10be02be54 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Mon, 14 Oct 2024 08:31:05 +1100 Subject: [PATCH] Update MicrosoftWindowsApp Resolve FwLink URLs --- Evergreen/Apps/Get-MicrosoftWindowsApp.ps1 | 12 ++++++++++-- Evergreen/Manifests/MicrosoftWindowsApp.json | 6 +++--- Evergreen/Manifests/MicrosoftWvdBootloader.json | 2 +- Evergreen/Manifests/MicrosoftWvdInfraAgent.json | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Evergreen/Apps/Get-MicrosoftWindowsApp.ps1 b/Evergreen/Apps/Get-MicrosoftWindowsApp.ps1 index 9812d9d0..63629b4c 100644 --- a/Evergreen/Apps/Get-MicrosoftWindowsApp.ps1 +++ b/Evergreen/Apps/Get-MicrosoftWindowsApp.ps1 @@ -15,9 +15,17 @@ function Get-MicrosoftWindowsApp { ) foreach ($Url in $res.Get.Download.Uri) { + + # Resolve the Microsoft FwLink URL + $params = @{ + Uri = $Url + WarningAction = "Ignore" + } + $ResolvedUrl = Resolve-MicrosoftFwLink @params + # Grab the download link headers to find the file name $params = @{ - Uri = $Url + Uri = $ResolvedUrl.URI Method = "Head" ReturnObject = "Headers" } @@ -37,7 +45,7 @@ function Get-MicrosoftWindowsApp { Date = $Headers['Last-Modified'] | Select-Object -First 1 Architecture = Get-Architecture -String $Filename Filename = $Filename - URI = $Url + URI = $ResolvedUrl.URI } Write-Output -InputObject $PSObject } diff --git a/Evergreen/Manifests/MicrosoftWindowsApp.json b/Evergreen/Manifests/MicrosoftWindowsApp.json index 9c73323d..f84f726e 100644 --- a/Evergreen/Manifests/MicrosoftWindowsApp.json +++ b/Evergreen/Manifests/MicrosoftWindowsApp.json @@ -5,9 +5,9 @@ "Update": {}, "Download": { "Uri": [ - "https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RW1pC6G", - "https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RW1pHol", - "https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RW1pJV5" + "https://go.microsoft.com/fwlink/?linkid=2262633", + "https://go.microsoft.com/fwlink/?linkid=2262634", + "https://go.microsoft.com/fwlink/?linkid=2262635" ], "ApiUri": "https://query.prod.cms.rt.microsoft.com/cms/api", "ApiHeader1": "X-CMS-Tenant", diff --git a/Evergreen/Manifests/MicrosoftWvdBootloader.json b/Evergreen/Manifests/MicrosoftWvdBootloader.json index 7badd5e6..18ac2c87 100644 --- a/Evergreen/Manifests/MicrosoftWvdBootloader.json +++ b/Evergreen/Manifests/MicrosoftWvdBootloader.json @@ -1,6 +1,6 @@ { "Name": "Microsoft Azure Virtual Desktop Agent Bootloader", - "Source": "https://docs.microsoft.com/en-us/azure/virtual-desktop/create-host-pools-powershell", + "Source": "https://learn.microsoft.com/en-us/azure/virtual-desktop/add-session-hosts-host-pool?tabs=portal%2Cgui#register-session-hosts-to-a-host-pool", "Get": { "Download": { "Uri": "https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWrxrH", diff --git a/Evergreen/Manifests/MicrosoftWvdInfraAgent.json b/Evergreen/Manifests/MicrosoftWvdInfraAgent.json index 7c65bd81..c7b5de59 100644 --- a/Evergreen/Manifests/MicrosoftWvdInfraAgent.json +++ b/Evergreen/Manifests/MicrosoftWvdInfraAgent.json @@ -1,6 +1,6 @@ { "Name": "Microsoft Azure Virtual Desktop Agent", - "Source": "https://docs.microsoft.com/en-us/azure/virtual-desktop/create-host-pools-powershell", + "Source": "https://learn.microsoft.com/en-us/azure/virtual-desktop/add-session-hosts-host-pool?tabs=portal%2Cgui#register-session-hosts-to-a-host-pool", "Get": { "Download": { "Uri": "https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWrmXv",