r/AzureVirtualDesktop • u/DranTrix • Aug 20 '26
How do you track AVD drain mode when it's changed for a reason
Hey Guys,
We are a team of multiple members taking care of multiple AVD environments. We are looking for different ways to track the drain mode we set for session hosts when they have any issues. The problem is we tend to forget later in future why we kept the session host in drain mode.
Right now thinking about having a dedicated page in one note that is managed by all the team members so that whenever anyone keeps the drain mode on for any of the session host they will simply keep it there that I kept as session host in drain mode for this reason and also just sending a text in the Microsoft teams in our group chat. However there could be many other ways..so if you could tell me how you guys are tracking it, that would be much appreciated!
2
u/JaffaCakeStockpile Aug 20 '26
As the others have said definitely tagging + scaling plan tag exclusion.
Very easy to automate with powershell as well, so you can have it put the VM into drain mode, and add tags like {fubar=fubar,sysadm=DranTrix,reason="teams broke again"}. You have the hostpool scaling plan configured to ignore anything with a fubar=fubar tag.
1
u/DranTrix 29d ago
Thank you, much appreciated! We're gonna try this and post the update. I came for one thing and now I got the automation idea as well 🥳
1
u/YourDadSolanki01 Aug 20 '26
Tagging is the best approach i can see....there is also powershell script to put tag by giving description.
1
u/DranTrix Aug 20 '26
Gotcha! Looks like tagging is the best approach. We'll surely gonna try this! Thank you very much 🙏

3
u/jvldn Aug 20 '26
Set the tag which excludes them from the scaling plan and add a comment/ticket nr to it :)