Forum Discussion

Eric_Logsdon's avatar
Eric_Logsdon
Brass Contributor
Apr 25, 2025
Solved

Sending notifications with Azure Virtual Desktop Auto-Shutdown

We have several Virtual Desktops that are used during business hours. I know I can use the auto-shutdown feature to shut the VM down at a scheduled time at night to save costs. What I would like to do is notify the logged-on users (we use personal and pooled host pools) that their VM will be shut down in fifteen or thirty minutes and give them the chance to extend by an hour in case they are working late. I saw a webhook by fortytwoservices called avd-shutdown on github that may do what I want, but the documentation on implementing it is a bit unclear to me. 

Is there a solution, native or add on that would send notifications like this for me?

Thanks,

Eric.,

 

 

  • KartikDogra's avatar
    KartikDogra
    May 21, 2025

    may be you can check for some PowerShell script that can be added task scheduler which will run in specific time to intimate users before the shutdown 

11 Replies

  • KartikDogra's avatar
    KartikDogra
    Brass Contributor

    you can use autoscaling for your host pools that will define the time when to shutdown, also with autoscaling you can allow to set the condition to keep the session active and only shutdown when users have logged off from the session or disconnected for a long time.

  • ChiChong's avatar
    ChiChong
    Copper Contributor

    You might consider using an Azure Virtual Desktop scaling plan to shut down AVD, as it provides notifications when AVD is being shut down and allows you to set a time range, such as 30 minutes.
    https://learn.microsoft.com/en-us/azure/virtual-desktop/autoscale-create-assign-scaling-plan?tabs=portal%2Cintune&pivots=power-management

    • Eric_Logsdon's avatar
      Eric_Logsdon
      Brass Contributor

      ChiChong@KartikDogra, I will give that a try. I had it configured, but I needed to tweak a couple of parameters.

      • Eric_Logsdon's avatar
        Eric_Logsdon
        Brass Contributor

        I set up a scaling plan for an AVD personal host pool. It shuts the VMs down as expected, but it is not sending notification. I don't see any place in the scaling plan set up to notify the user. Am I missing a setting somewhere else? 

        Thanks.

    • Eric_Logsdon's avatar
      Eric_Logsdon
      Brass Contributor

      I had looked at it. The link on setting up the webhook appears to be dead.

Resources