Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

New-RASSchedule

SYNOPSIS

Creates a new Schedule.

SYNTAX

New-RASSchedule [-Name] <string> [[-SiteId] <uint>]
 -Action {Disable | Reboot | Startup | Shutdown | Recreate} -HostAzureID <string>
 -ObjType {RDS | VDI | AVD} -PoolId <uint> -TargetType {Host | HostPool} [-CompleteIn <uint>]
 [-Description <string>] [-DurationInSecs <double>] [-Enabled <bool>] [-EnableDrainMode <bool>]
 [-EnforceScheduleInactiveHost <bool>] [-ForceServerRebootAfter <uint>] [-MembersToStart <uint>]
 [-OnDisable <bool>] [-PercentageMembers <uint>] [-PoolMembersType <uint>]
 [-PowerOnAssignedPoolMembers <uint>]
 [-Repeat {Never | EveryDay | EveryWeek | Every2Weeks | EveryMonth | EveryYear | SpecificDays}]
 [-SpecificDays {Never | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}]
 [-StartDateTime <DateTime>] [-TriggerOnlyIfSessionStateDown <bool>] [-Type <uint>]
 [<CommonParameters>]
New-RASSchedule [-Name] <string> [[-SiteId] <uint>]
 -Action {Disable | Reboot | Startup | Shutdown | Recreate} -GuestName <string> -GUID <string>
 -ObjType {RDS | VDI | AVD} -PoolId <uint> -TargetType {Host | HostPool} [-CompleteIn <uint>]
 [-Description <string>] [-DurationInSecs <double>] [-Enabled <bool>] [-EnableDrainMode <bool>]
 [-EnforceScheduleInactiveHost <bool>] [-ForceServerRebootAfter <uint>] [-MembersToStart <uint>]
 [-OnDisable <bool>] [-PercentageMembers <uint>] [-PoolMembersType <uint>]
 [-PowerOnAssignedPoolMembers <uint>]
 [-Repeat {Never | EveryDay | EveryWeek | Every2Weeks | EveryMonth | EveryYear | SpecificDays}]
 [-SpecificDays {Never | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}]
 [-StartDateTime <DateTime>] [-TriggerOnlyIfSessionStateDown <bool>] [-Type <uint>]
 [<CommonParameters>]

DESCRIPTION

Creates a new Schedule property.

EXAMPLES

Example 1

Creates a new Schedule property with the specified name.

PARAMETERS

-Name

Schedule name.

-SiteId

Site ID from which to retrieve the schedule.

-ObjType

Schedule object type.

Possible values: RDS, VDI, AVD

Type reference: ScheduleObjType

-Action

Schedule Action Type

Possible values: Disable, Reboot, Startup, Shutdown, Recreate

Type reference: ScheduleActionType

-TargetType

Schedule target type. Accepted values: Host, Host Pool.

Possible values: Host, HostPool

Type reference: ScheduleTargetType

-Enabled

Whether to enable or disable the schedule.

-Description

Schedule description.

-Type

Schedule type

-TargetID

The target RD Session Host server or server group Ids depending on the TargetType parameter.

-PoolId

The TargetNativeHost Pool Id

-GUID

The TargetNativeHost GUID

-GuestName

The TargetNativeHost Guest Name

-HostAzureID

The TargetNativeHost Host Azure ID

-StartDateTime

Start time. Default: Now.

-DurationInSecs

Duration in seconds.

-Repeat

Repeat interval. Default: EveryWeek

Accepted values: Never, EveryDay, EveryWeek, Every2Weeks, EveryMonth, EveryYear.

Possible values: Never, EveryDay, EveryWeek, Every2Weeks, EveryMonth, EveryYear, SpecificDays

Type reference: RepeatType

-SpecificDays

Repeat on Specific Days.

Possible values: Never, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday

Type reference: RepeatSpecificDays

-CompleteIn

The duration of the scheduler task in minutes.

Default: 15 minutes for disable task, 10 minutes for reboot task.

-TriggerOnlyIfSessionStateDown

Specifies if 'Trigger only if a session state is "Down"' option is enabled or disabled.

Only available for reboot schedules for object types RDS and AVD.

-PoolMembersType

Whether to select the percentage or specific number of members to be started

-PercentageMembers

Percentage of members to be started

-MembersToStart

Specific number of members to be started

-PowerOnAssignedPoolMembers

Power On Assigned Pool Members

-EnableDrainMode

Whether to enable Drain Mode

-ForceServerRebootAfter

Force server reboot after the specified time in seconds

-EnforceScheduleInactiveHost

Enforce schedule for currently inactive host

-OnDisable

What action to take on Disable

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

Schedule

Last updated