.

 

 

AVD-Update

Update AVD Session Host Master Image in under 60 minutes


AVD-Update.ps1 assists initial configuration and monthly maintenance of AVD Session Host Master Images by updating the following components:

  • Microsoft Edge
  • Google Chrome (If installed)
  • Microsoft 365 Apps / Office 365
  • Microsoft Windows Defender
  • Microsoft OneDrive
  • Microsoft FSLogix
  • Microsoft Windows Updates / Recommended updates

Updating takes ~35-40 minutes and the VM reboots when complete.

All update services and tasks are disabled for each component, except for the Windows Update service which is required to update Microsoft Windows Defender, so that they cannot run when the Image has been deployed in Production environments.

Following the reboot, AVD-PostUpdate.ps1 must be run to complete maintenance tasks.

  • Compress WinSXS
  • Optimise .Net Framework
  • Update Root Certificates
  • Tidy folders and remove temporary media

The tasks that would normally invoke these processes are disabled so that they cannot run when the Image has been deployed in Production environments. It's better to run TiWorker.exe on the master image once only rather than every day on every session host.

Below is a typical logfile.

10/10/2024 5:14:23 PM : Windows Version: Windows 10 Enterprise multi-session 23H2 ServerRdsh 22631.4169
10/10/2024 5:14:23 PM : Edge Version: 128.0.2739.67
10/10/2024 5:14:23 PM : Updating Edge
10/10/2024 5:16:40 PM : Edge Version: 129.0.2792.79
10/10/2024 5:16:40 PM : Office 365 Version: 16.0.17830.20210
10/10/2024 5:16:40 PM : Updating Office 365
10/10/2024 5:25:42 PM : Office 365 Version: 16.0.17928.20216
10/10/2024 5:25:49 PM : Defender Product Version: 4.18.24080.9
10/10/2024 5:25:49 PM : Defender AV Signature Version: 1.419.436.0
10/10/2024 5:25:49 PM : Update Windows Defender
10/10/2024 5:25:51 PM : Defender Product Version: 4.18.24080.9
10/10/2024 5:25:51 PM : Defender AV Signature Version: 1.419.436.0
10/10/2024 5:25:51 PM : OneDrive Version: 24.166.0818.0003
10/10/2024 5:25:51 PM : Updating OneDrive
10/10/2024 5:26:34 PM : OneDrive Version: 24.181.0908.0001
10/10/2024 5:26:34 PM : FSLogix Version: 2.9.8884.27471
10/10/2024 5:26:34 PM : Updating FSLogix
10/10/2024 5:26:46 PM : FSlogix Version: 2.9.8884.27471
10/10/2024 5:26:52 PM : Updated NuGet
10/10/2024 5:27:05 PM : Installed PSWindowsUpdate
10/10/2024 5:27:05 PM : Starting Windows Update
10/10/2024 5:50:52 PM : Windows Updates Installed
10/10/2024 5:51:07 PM : -------------------------------- Reboot --------------------------------
10/10/2024 5:51:07 PM : Run AVD-PostUpdate.ps1 after the reboot to complete the image maintenance
10/10/2024 5:56:15 PM : Windows Version: Windows 10 Enterprise multi-session 23H2 ServerRdsh 22631.4317
10/10/2024 5:56:15 PM : Cleaning WinSXS
10/10/2024 6:00:43 PM : Cleaning WinSXS Complete
10/10/2024 6:00:43 PM : Start .Net Optimisation
10/10/2024 6:05:30 PM : .Net Optimised
10/10/2024 6:05:30 PM : Updating root certs
10/10/2024 6:05:59 PM : Updated root certs
10/10/2024 6:06:00 PM : Cleaned Windows Search
10/10/2024 6:06:00 PM : Cleared Azure logs and extensions
10/10/2024 6:06:06 PM : Cleared SoftwareDistribution
10/10/2024 6:06:06 PM : Take a Snapshot before sysprepping the VM