Microsoft.DesktopVirtualization scalingPlans/personalSchedules

Bicep resource definition

The scalingPlans/personalSchedules resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DesktopVirtualization/scalingPlans/personalSchedules resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.DesktopVirtualization/scalingPlans/personalSchedules@2026-04-01-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    daysOfWeek: [
      'string'
    ]
    offPeakActionOnDisconnect: 'string'
    offPeakActionOnLogoff: 'string'
    offPeakMinutesToWaitOnDisconnect: int
    offPeakMinutesToWaitOnLogoff: int
    offPeakStartTime: {
      hour: int
      minute: int
    }
    offPeakStartVMOnConnect: 'string'
    peakActionOnDisconnect: 'string'
    peakActionOnLogoff: 'string'
    peakMinutesToWaitOnDisconnect: int
    peakMinutesToWaitOnLogoff: int
    peakStartTime: {
      hour: int
      minute: int
    }
    peakStartVMOnConnect: 'string'
    rampDownActionOnDisconnect: 'string'
    rampDownActionOnLogoff: 'string'
    rampDownMinutesToWaitOnDisconnect: int
    rampDownMinutesToWaitOnLogoff: int
    rampDownStartTime: {
      hour: int
      minute: int
    }
    rampDownStartVMOnConnect: 'string'
    rampUpActionOnDisconnect: 'string'
    rampUpActionOnLogoff: 'string'
    rampUpAutoStartHosts: 'string'
    rampUpMinutesToWaitOnDisconnect: int
    rampUpMinutesToWaitOnLogoff: int
    rampUpStartTime: {
      hour: int
      minute: int
    }
    rampUpStartVMOnConnect: 'string'
  }
}

Property Values

Microsoft.DesktopVirtualization/scalingPlans/personalSchedules

Name Description Value
name The resource name string

Constraints:
Min length = 1
Max length = 64
Pattern = ^[A-Za-z0-9@.\-_ ]*$ (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: scalingPlans
properties Detailed properties for ScalingPlanPersonalSchedule ScalingPlanPersonalScheduleProperties (required)

ScalingPlanPersonalScheduleProperties

Name Description Value
daysOfWeek Set of days of the week on which this schedule is active. String array containing any of:
'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
'Wednesday'
offPeakActionOnDisconnect Action to be taken after a user disconnect during the off-peak period. 'Deallocate'
'Hibernate'
'None'
offPeakActionOnLogoff Action to be taken after a logoff during the off-peak period. 'Deallocate'
'Hibernate'
'None'
offPeakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the off-peak period. int

Constraints:
Min value = 0
offPeakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the off-peak period. int

Constraints:
Min value = 0
offPeakStartTime Starting time for off-peak period. Time
offPeakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the off-peak phase. 'Disable'
'Enable'
peakActionOnDisconnect Action to be taken after a user disconnect during the peak period. 'Deallocate'
'Hibernate'
'None'
peakActionOnLogoff Action to be taken after a logoff during the peak period. 'Deallocate'
'Hibernate'
'None'
peakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the peak period. int

Constraints:
Min value = 0
peakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the peak period. int

Constraints:
Min value = 0
peakStartTime Starting time for peak period. Time
peakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the peak phase. 'Disable'
'Enable'
rampDownActionOnDisconnect Action to be taken after a user disconnect during the ramp down period. 'Deallocate'
'Hibernate'
'None'
rampDownActionOnLogoff Action to be taken after a logoff during the ramp down period. 'Deallocate'
'Hibernate'
'None'
rampDownMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp down period. int

Constraints:
Min value = 0
rampDownMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp down period. int

Constraints:
Min value = 0
rampDownStartTime Starting time for ramp down period. Time
rampDownStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the ramp down phase. 'Disable'
'Enable'
rampUpActionOnDisconnect Action to be taken after a user disconnect during the ramp up period. 'Deallocate'
'Hibernate'
'None'
rampUpActionOnLogoff Action to be taken after a logoff during the ramp up period. 'Deallocate'
'Hibernate'
'None'
rampUpAutoStartHosts The desired startup behavior during the ramp up period for personal vms in the hostpool. 'All'
'None'
'WithAssignedUser'
rampUpMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp up period. int

Constraints:
Min value = 0
rampUpMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp up period. int

Constraints:
Min value = 0
rampUpStartTime Starting time for ramp up period. Time
rampUpStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning them on manually. 'Disable'
'Enable'

Time

Name Description Value
hour The hour. int

Constraints:
Min value = 0
Max value = 23 (required)
minute The minute. int

Constraints:
Min value = 0
Max value = 59 (required)

ARM template resource definition

The scalingPlans/personalSchedules resource type can be deployed with operations that target:

Usage Examples

Resource format

To create a Microsoft.DesktopVirtualization/scalingPlans/personalSchedules resource, add the following JSON to your template.

{
  "type": "Microsoft.DesktopVirtualization/scalingPlans/personalSchedules",
  "apiVersion": "2026-04-01-preview",
  "name": "string",
  "properties": {
    "daysOfWeek": [ "string" ],
    "offPeakActionOnDisconnect": "string",
    "offPeakActionOnLogoff": "string",
    "offPeakMinutesToWaitOnDisconnect": "int",
    "offPeakMinutesToWaitOnLogoff": "int",
    "offPeakStartTime": {
      "hour": "int",
      "minute": "int"
    },
    "offPeakStartVMOnConnect": "string",
    "peakActionOnDisconnect": "string",
    "peakActionOnLogoff": "string",
    "peakMinutesToWaitOnDisconnect": "int",
    "peakMinutesToWaitOnLogoff": "int",
    "peakStartTime": {
      "hour": "int",
      "minute": "int"
    },
    "peakStartVMOnConnect": "string",
    "rampDownActionOnDisconnect": "string",
    "rampDownActionOnLogoff": "string",
    "rampDownMinutesToWaitOnDisconnect": "int",
    "rampDownMinutesToWaitOnLogoff": "int",
    "rampDownStartTime": {
      "hour": "int",
      "minute": "int"
    },
    "rampDownStartVMOnConnect": "string",
    "rampUpActionOnDisconnect": "string",
    "rampUpActionOnLogoff": "string",
    "rampUpAutoStartHosts": "string",
    "rampUpMinutesToWaitOnDisconnect": "int",
    "rampUpMinutesToWaitOnLogoff": "int",
    "rampUpStartTime": {
      "hour": "int",
      "minute": "int"
    },
    "rampUpStartVMOnConnect": "string"
  }
}

Property Values

Microsoft.DesktopVirtualization/scalingPlans/personalSchedules

Name Description Value
apiVersion The api version '2026-04-01-preview'
name The resource name string

Constraints:
Min length = 1
Max length = 64
Pattern = ^[A-Za-z0-9@.\-_ ]*$ (required)
properties Detailed properties for ScalingPlanPersonalSchedule ScalingPlanPersonalScheduleProperties (required)
type The resource type 'Microsoft.DesktopVirtualization/scalingPlans/personalSchedules'

ScalingPlanPersonalScheduleProperties

Name Description Value
daysOfWeek Set of days of the week on which this schedule is active. String array containing any of:
'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
'Wednesday'
offPeakActionOnDisconnect Action to be taken after a user disconnect during the off-peak period. 'Deallocate'
'Hibernate'
'None'
offPeakActionOnLogoff Action to be taken after a logoff during the off-peak period. 'Deallocate'
'Hibernate'
'None'
offPeakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the off-peak period. int

Constraints:
Min value = 0
offPeakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the off-peak period. int

Constraints:
Min value = 0
offPeakStartTime Starting time for off-peak period. Time
offPeakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the off-peak phase. 'Disable'
'Enable'
peakActionOnDisconnect Action to be taken after a user disconnect during the peak period. 'Deallocate'
'Hibernate'
'None'
peakActionOnLogoff Action to be taken after a logoff during the peak period. 'Deallocate'
'Hibernate'
'None'
peakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the peak period. int

Constraints:
Min value = 0
peakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the peak period. int

Constraints:
Min value = 0
peakStartTime Starting time for peak period. Time
peakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the peak phase. 'Disable'
'Enable'
rampDownActionOnDisconnect Action to be taken after a user disconnect during the ramp down period. 'Deallocate'
'Hibernate'
'None'
rampDownActionOnLogoff Action to be taken after a logoff during the ramp down period. 'Deallocate'
'Hibernate'
'None'
rampDownMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp down period. int

Constraints:
Min value = 0
rampDownMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp down period. int

Constraints:
Min value = 0
rampDownStartTime Starting time for ramp down period. Time
rampDownStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the ramp down phase. 'Disable'
'Enable'
rampUpActionOnDisconnect Action to be taken after a user disconnect during the ramp up period. 'Deallocate'
'Hibernate'
'None'
rampUpActionOnLogoff Action to be taken after a logoff during the ramp up period. 'Deallocate'
'Hibernate'
'None'
rampUpAutoStartHosts The desired startup behavior during the ramp up period for personal vms in the hostpool. 'All'
'None'
'WithAssignedUser'
rampUpMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp up period. int

Constraints:
Min value = 0
rampUpMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp up period. int

Constraints:
Min value = 0
rampUpStartTime Starting time for ramp up period. Time
rampUpStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning them on manually. 'Disable'
'Enable'

Time

Name Description Value
hour The hour. int

Constraints:
Min value = 0
Max value = 23 (required)
minute The minute. int

Constraints:
Min value = 0
Max value = 59 (required)

Terraform (AzAPI provider) resource definition

The scalingPlans/personalSchedules resource type can be deployed with operations that target:

  • Resource groups For a list of changed properties in each API version, see change log.

Usage Examples

Terraform Samples

A basic example of deploying Desktop Virtualization Scaling Plans Personal Schedules.

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

provider "azurerm" {
  features {
  }
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

data "azuread_service_principal" "test" {
  display_name = "Windows Virtual Desktop"
}

resource "azurerm_role_assignment" "test" {
  name                             = "4a23d649-5bf7-41b8-9701-c17f811f68da"
  scope                            = azapi_resource.resourceGroup.id
  role_definition_name             = "Desktop Virtualization Power On Off Contributor"
  principal_id                     = data.azuread_service_principal.test.object_id
  skip_service_principal_aad_check = true
}

resource "azapi_resource" "hostPool" {
  type      = "Microsoft.DesktopVirtualization/hostPools@2023-09-05"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      hostPoolType          = "Personal"
      loadBalancerType      = "Persistent"
      maxSessionLimit       = 999999
      preferredAppGroupType = "Desktop"
      publicNetworkAccess   = "Enabled"
      startVMOnConnect      = true
      validationEnvironment = false
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "scalingPlan" {
  depends_on = [azurerm_role_assignment.test]
  type       = "Microsoft.DesktopVirtualization/scalingPlans@2023-11-01-preview"
  name       = var.resource_name
  location   = var.location
  parent_id  = azapi_resource.resourceGroup.id
  body = {
    properties = {
      timeZone     = "W. Europe Standard Time"
      hostPoolType = "Personal"
      exclusionTag = "no-schedule"
      schedules    = []
      hostPoolReferences = [
        {
          hostPoolArmPath    = azapi_resource.hostPool.id,
          scalingPlanEnabled = true
        }
      ]
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "personalSchedule" {
  type      = "Microsoft.DesktopVirtualization/scalingPlans/personalSchedules@2023-11-01-preview"
  name      = "Weekdays"
  parent_id = azapi_resource.scalingPlan.id
  body = {
    properties = {
      daysOfWeek = [
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday"
      ]

      rampUpStartTime = {
        hour   = 7
        minute = 0
      }

      rampUpAutoStartHosts            = "None"
      rampUpStartVMOnConnect          = "Enable"
      rampUpMinutesToWaitOnDisconnect = 45
      rampUpActionOnDisconnect        = "Hibernate"
      rampUpMinutesToWaitOnLogoff     = 30
      rampUpActionOnLogoff            = "Hibernate"

      peakStartTime = {
        hour   = 8
        minute = 0
      }

      peakStartVMOnConnect          = "Enable"
      peakMinutesToWaitOnDisconnect = 60
      peakActionOnDisconnect        = "Hibernate"
      peakMinutesToWaitOnLogoff     = 60
      peakActionOnLogoff            = "Hibernate"

      rampDownStartTime = {
        hour   = 16
        minute = 30
      }

      rampDownStartVMOnConnect          = "Enable"
      rampDownMinutesToWaitOnDisconnect = 45
      rampDownActionOnDisconnect        = "Hibernate"
      rampDownMinutesToWaitOnLogoff     = 30
      rampDownActionOnLogoff            = "Hibernate"

      offPeakStartTime = {
        hour   = 17
        minute = 30
      }

      offPeakStartVMOnConnect          = "Enable"
      offPeakMinutesToWaitOnDisconnect = 20
      offPeakActionOnDisconnect        = "Hibernate"
      offPeakMinutesToWaitOnLogoff     = 15
      offPeakActionOnLogoff            = "Hibernate"
    }
  }
}

Resource format

To create a Microsoft.DesktopVirtualization/scalingPlans/personalSchedules resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DesktopVirtualization/scalingPlans/personalSchedules@2026-04-01-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      daysOfWeek = [
        "string"
      ]
      offPeakActionOnDisconnect = "string"
      offPeakActionOnLogoff = "string"
      offPeakMinutesToWaitOnDisconnect = int
      offPeakMinutesToWaitOnLogoff = int
      offPeakStartTime = {
        hour = int
        minute = int
      }
      offPeakStartVMOnConnect = "string"
      peakActionOnDisconnect = "string"
      peakActionOnLogoff = "string"
      peakMinutesToWaitOnDisconnect = int
      peakMinutesToWaitOnLogoff = int
      peakStartTime = {
        hour = int
        minute = int
      }
      peakStartVMOnConnect = "string"
      rampDownActionOnDisconnect = "string"
      rampDownActionOnLogoff = "string"
      rampDownMinutesToWaitOnDisconnect = int
      rampDownMinutesToWaitOnLogoff = int
      rampDownStartTime = {
        hour = int
        minute = int
      }
      rampDownStartVMOnConnect = "string"
      rampUpActionOnDisconnect = "string"
      rampUpActionOnLogoff = "string"
      rampUpAutoStartHosts = "string"
      rampUpMinutesToWaitOnDisconnect = int
      rampUpMinutesToWaitOnLogoff = int
      rampUpStartTime = {
        hour = int
        minute = int
      }
      rampUpStartVMOnConnect = "string"
    }
  }
}

Property Values

Microsoft.DesktopVirtualization/scalingPlans/personalSchedules

Name Description Value
name The resource name string

Constraints:
Min length = 1
Max length = 64
Pattern = ^[A-Za-z0-9@.\-_ ]*$ (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: scalingPlans
properties Detailed properties for ScalingPlanPersonalSchedule ScalingPlanPersonalScheduleProperties (required)
type The resource type "Microsoft.DesktopVirtualization/scalingPlans/personalSchedules@2026-04-01-preview"

ScalingPlanPersonalScheduleProperties

Name Description Value
daysOfWeek Set of days of the week on which this schedule is active. String array containing any of:
'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
'Wednesday'
offPeakActionOnDisconnect Action to be taken after a user disconnect during the off-peak period. 'Deallocate'
'Hibernate'
'None'
offPeakActionOnLogoff Action to be taken after a logoff during the off-peak period. 'Deallocate'
'Hibernate'
'None'
offPeakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the off-peak period. int

Constraints:
Min value = 0
offPeakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the off-peak period. int

Constraints:
Min value = 0
offPeakStartTime Starting time for off-peak period. Time
offPeakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the off-peak phase. 'Disable'
'Enable'
peakActionOnDisconnect Action to be taken after a user disconnect during the peak period. 'Deallocate'
'Hibernate'
'None'
peakActionOnLogoff Action to be taken after a logoff during the peak period. 'Deallocate'
'Hibernate'
'None'
peakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the peak period. int

Constraints:
Min value = 0
peakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the peak period. int

Constraints:
Min value = 0
peakStartTime Starting time for peak period. Time
peakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the peak phase. 'Disable'
'Enable'
rampDownActionOnDisconnect Action to be taken after a user disconnect during the ramp down period. 'Deallocate'
'Hibernate'
'None'
rampDownActionOnLogoff Action to be taken after a logoff during the ramp down period. 'Deallocate'
'Hibernate'
'None'
rampDownMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp down period. int

Constraints:
Min value = 0
rampDownMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp down period. int

Constraints:
Min value = 0
rampDownStartTime Starting time for ramp down period. Time
rampDownStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the ramp down phase. 'Disable'
'Enable'
rampUpActionOnDisconnect Action to be taken after a user disconnect during the ramp up period. 'Deallocate'
'Hibernate'
'None'
rampUpActionOnLogoff Action to be taken after a logoff during the ramp up period. 'Deallocate'
'Hibernate'
'None'
rampUpAutoStartHosts The desired startup behavior during the ramp up period for personal vms in the hostpool. 'All'
'None'
'WithAssignedUser'
rampUpMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp up period. int

Constraints:
Min value = 0
rampUpMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp up period. int

Constraints:
Min value = 0
rampUpStartTime Starting time for ramp up period. Time
rampUpStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning them on manually. 'Disable'
'Enable'

Time

Name Description Value
hour The hour. int

Constraints:
Min value = 0
Max value = 23 (required)
minute The minute. int

Constraints:
Min value = 0
Max value = 59 (required)