Hi @Joseph az,
Thanks for contacting Microsoft Q&A platform.
Do you need it for normal virtual machines or for AVD session hosts?
For normal vm's you can use the auto shutdown feature. https://learn.microsoft.com/en-us/azure/devtest-labs/devtest-lab-auto-shutdown
Otherwise you can use scaling plans for AVD: https://learn.microsoft.com/en-us/azure/virtual-desktop/autoscale-scaling-plan?tabs=pooled-autoscale
Hope this helps you.