Automating Windows Updates for Azure Virtual Desktop (AVD) Golden Image

Automating Windows Updates for Azure Virtual Desktop (AVD) Golden Image

Keeping your Azure Virtual Desktop (AVD) Golden Image up to date is essential for security, stability, and performance. While the Windows Update interface provides an easy way to install updates, automating the process using PowerShell ensures that your Golden Image remains optimized and compliant before deployment.

In this blog post, I’ll Walk you through a PowerShell script that automates the Windows Update process for AVD Golden Images, ensuring that your base image is fully patched before provisioning new session hosts.

Why Automate Windows Updates for AVD Golden Images?

Manually checking and installing Windows updates on a Golden Image can be time-consuming, especially when preparing multiple images. Automating the update process with PowerShell provides several benefits:

  • Ensures Image Compliance: Keeps your Golden Image updated with the latest patches before deployment.
  • Reduces Manual Effort: No need to manually check and install updates.
  • Improves Security: Ensures critical updates are applied before creating new session hosts.
  • Optimized Performance: Prevents performance issues caused by outdated software.
  • Custom Reporting: Generates logs to keep track of applied updates.

The PowerShell Script to Automate Windows Updates for AVD Golden Image

Below is a PowerShell script designed to check for, download, and install available updates on your AVD Golden Image. The script must be executed with Administrator privileges to function correctly.

Here is the screeshot of the code.

A screen shot of a computer program

AI-generated content may be incorrect.

The complete script can be downloaded from my the github link.

Running the Script

  • Open PowerShell as Administrator.
  • Copy and paste the script into the PowerShell window or save it as Update_Windows.ps1 file and run it.
  • The script will generate a report of updates applied, saved as AVD_GoldenImage_Report.txt.

Next Step

By automating Windows updates for your AVD Golden Image, you ensure that your base image is fully patched before deploying new session hosts. This approach enhances security, compliance, and operational efficiency, reducing potential vulnerabilities in your virtual desktop environment.

Try this script for your AVD Golden Image preparation and let us know how it works for you!

0.00 avg. rating (0% score) - 0 votes