Forum Discussion
Deallocate VM on user logoff
- Sep 20, 2021
Could you please try to update the custom role used for Start VM on Connect and add Microsoft.Compute/virtualMachines/instanceView/read to it? This should ensure that sessions are removed in the service upon deallocation of the virtual machine.
We've already updated our docs for Start VM on Connect, but could be easily missed by customers already using this feature.
Hi krayste,
For an AD-joined host pool I would recommend configuring the mentioned settings via central group policy and targeting this to the OU where your session-hosts reside. You would then also make the script accessible on a central location, e.g. the SYSVOL share, so you don't need to deploy the script on every host.
For AAD-only environments there may be an option to automate it using MEM/Intune.
Regards,
Bernd