Forum Discussion
Harsh1730
Oct 18, 2021Copper Contributor
How to automatically shutdown personal desktop with no active session
How to automatically shutdown personal desktop with no active session after hours ?? Pls help
Chandrasekhar_Arya
Oct 18, 2021Iron Contributor
Harsh1730 you need to configure the following scheduled
Set auto startup schedules
Set auto shutdown schedules
Automatically disconnect when a machine is idle for X minutes
Shut down X minutes after a user disconnects
Shut down X minutes if a user does not connect
You can find details on how to configure
Overview: https://docs.microsoft.com/en-us/azure/devtest-labs/devtest-lab-overview
Auto startup: https://docs.microsoft.com/en-us/azure/devtest-labs/devtest-lab-auto-startup-vm
Auto shutdown: https://docs.microsoft.com/en-us/azure/devtest-labs/devtest-lab-auto-shutdown
Shutdown after X minutes: https://docs.microsoft.com/en-us/azure/lab-services/how-to-enable-shutdown-disconnect
Harsh1730
Oct 18, 2021Copper Contributor
Thanks. I already have VM start on connect, configured gpo to log off disconnected session after two hours. just need script or something similar to deallocate vm after hours when no user session is connected
- Chandrasekhar_AryaOct 18, 2021Iron ContributorYou can find scripts from this location https://github.com/tsrob50/WVD-Public and an explanation on how to use https://www.ciraltos.com/automatically-start-and-stop-wvd-vms-with-azure-automation/
hope that helps