Forum Discussion
rachterberg
Apr 17, 2020Copper Contributor
Windows Virtual Desktop shutdown for inactivity
We are using WVD with single provisioned host pools and single user images. This was by design. We can set auto shutdown for each desktop but we would really like to have the WVD autoshutdown after a...
CelDB
Feb 24, 2022Copper Contributor
Scaling plans are in preview, unfortunately they aren't available in the region my host pools are, so haven't been able to test.
However I'm currently doing this by using a PowerShell Function App with a timer function that runs twice hourly. You can query the host pool(s) and machines within, check for ones that have no active sessions, then shut them down. It's not perfect, but neither is AVD.
However I'm currently doing this by using a PowerShell Function App with a timer function that runs twice hourly. You can query the host pool(s) and machines within, check for ones that have no active sessions, then shut them down. It's not perfect, but neither is AVD.
ljajapur
Feb 24, 2022Copper Contributor
can you please share the PowerShell script that you use? or what commands you use to find out the active sessions
- CelDBFeb 24, 2022Copper ContributorSure no problem. I used this and made a few improvements on it.
Credit to Travis Roberts:
https://github.com/tsrob50/WVD-Public/blob/master/StopSH-MultiHostPools.ps1
https://www.youtube.com/watch?v=0PWO3OaZmeQ- techiegzMar 01, 2023Copper Contributor
I would alternatively like to try Hibernating VMs via Intune poser settings. Any idea how/if shutdown/hibernating VMs will respond when users try to sign in/connect later?