This video goes of using the SnapImage.ps1 PowerShell script. This script automates the process of creating an image from an Azure VM without destroying it during the capture process. At a high-level, the following steps are taken:
Snapshot of source “reference” VM > create a temp “capture” Resource Group > OS disk from snapshot > create a VNet and VM in the capture RG > sysprep the VM with a Custom Script Extension > capture the VM > If using Azure Compute Gallery, add image to the gallery, If not using Azure Compute Gallery, add image to reference VM Resource Group > remove capture Resource Group > remove snapshot
Please read the description and notes in the script before running. If the script hangs on the sysprep step, verify the reference computer is ready for sysprep including all updates are applied or automatic updates are disabled, and there are no per-user Microsoft store applications installed.
Zero to Hero with Azure Virtual Desktop https://www.udemy.com/course/zero-to-hero-with-windows-virtual-desktop/?referralCode=B2FE49E6FCEE7A7EA8D4
Image Builder Playlist
GitHub Repo https://github.com/tsrob50/WVD-Public
Sysprep fails after remove Microsoft Store Apps