I'm working on automating the process of versioning VM images for Azure Virtual Desktop (AVD). I aimed to create a Runbook to generalize a VM image and publish it to a compute gallery. However, I'm having issues because when I use Invoke-RunCommand, it executes as the system account and the generalization isn't functioning as expected. Can someone guide me on how to effectively accomplish this task?
1 Answer
Have you considered using Azure Image Builder? I've found it can streamline the image creation process significantly. It allows for a lot of customization and automates many tasks.

Looks like I can't because the apps in their tenant are specific to them and need frequent updates. The machine must be domain-joined for these updates to work.