Skip to content

Commit 783c318

Browse files
AVD Bootloader download link and PowerShell
1 parent 49d73f0 commit 783c318

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

articles/virtual-desktop/add-session-hosts-host-pool.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ Select the relevant tab for your scenario and follow the steps.
336336
1. Download the installation files for the Agent and the Agent Boot Loader by using the following links. If you need to unblock them, right-click each file, select **Properties**, select **Unblock**, and finally select **OK**.
337337

338338
- [Azure Virtual Desktop Agent](https://go.microsoft.com/fwlink/?linkid=2310011)
339-
- [Azure Virtual Desktop Agent Bootloader](https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWrxrH)
339+
- [Azure Virtual Desktop Agent Bootloader](https://go.microsoft.com/fwlink/?linkid=2311028)
340340

341341
> [!TIP]
342342
> The Azure Virtual Desktop Agent download link is for the latest production version in [non-validation environments](terminology.md#validation-environment). This download link is updated after the automatic production rollout is complete, so you might see a delay between the release of a production version and the update of the download link. After you install the Azure Virtual Desktop Agent, it's updated automatically. For more information about the rollout of new versions of the agent, see [What's new in the Azure Virtual Desktop Agent?](whats-new-agent.md#latest-available-versions).
@@ -372,23 +372,24 @@ You can use `msiexec` to install the agent and the boot loader from the command
372372
```powershell
373373
$uris = @(
374374
"https://go.microsoft.com/fwlink/?linkid=2310011"
375-
"https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWrxrH"
375+
"https://go.microsoft.com/fwlink/?linkid=2311028"
376376
)
377377
378378
$installers = @()
379379
foreach ($uri in $uris) {
380-
$download = Invoke-WebRequest -Uri $uri -UseBasicParsing
380+
$expandedUri = (Invoke-WebRequest -MaximumRedirection 0 -Uri $uri -ErrorAction SilentlyContinue).Headers.Location
381+
$fileName = ($expandedUri).Split('/')[-1]
381382
382-
$fileName = ($download.Headers.'Content-Disposition').Split('=')[1].Replace('"','')
383-
$output = [System.IO.FileStream]::new("$pwd\$fileName", [System.IO.FileMode]::Create)
384-
$output.write($download.Content, 0, $download.RawContentLength)
385-
$output.close()
386-
$installers += $output.Name
383+
Invoke-WebRequest -Uri $expandedUri -UseBasicParsing -OutFile $fileName
384+
$installers += "$pwd\$fileName"
387385
}
388386
389387
foreach ($installer in $installers) {
390388
Unblock-File -Path "$installer"
391389
}
390+
391+
Write-Host "`nFiles downloaded:`n"
392+
$installers
392393
```
393394

394395
> [!TIP]

0 commit comments

Comments
 (0)