# Set-RASSchedule

## NAME

Set-RASSchedule

## SYNOPSIS

Modifies a Schedule.

## SYNTAX

**Set-RASSchedule** \[-[Id](#Id)] _\<uint>_ -[ObjType](#ObjType) {RDS | VDI | AVD} \[-[CompleteIn](#CompleteIn) _\<uint>_] \[-[Description](#Description) _\<string>_] \[-[DurationInSecs](#DurationInSecs) _\<double>_] \[-[Enabled](#Enabled) _\<bool>_] \[-[EnableDrainMode](#EnableDrainMode) _\<bool>_] \[-[EnforceScheduleInactiveHost](#EnforceScheduleInactiveHost) _\<bool>_] \[-[ForceServerRebootAfter](#ForceServerRebootAfter) _\<uint>_] \[-[MembersToStart](#MembersToStart) _\<uint>_] \[-[NewName](#NewName) _\<string>_] \[-[OnDisable](#OnDisable) _\<bool>_] \[-[PercentageMembers](#PercentageMembers) _\<uint>_] \[-[PoolMembersType](#PoolMembersType) _\<uint>_] \[-[PowerOnAssignedPoolMembers](#PowerOnAssignedPoolMembers) _\<uint>_] \[-[Repeat](#Repeat) {Never | EveryDay | EveryWeek | Every2Weeks | EveryMonth | EveryYear | SpecificDays}] \[-[SpecificDays](#SpecificDays) {Never | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] \[-[StartDateTime](#StartDateTime) _\<DateTime>_] \[_<_[_CommonParameters_](#CommonParameters)_>_]

**Set-RASSchedule** \[-[InputObject](#InputObject)] _<_[_Schedule_](../classes-and-enumerations/schedule)_>_ \[-[CompleteIn](#CompleteIn) _\<uint>_] \[-[Description](#Description) _\<string>_] \[-[DurationInSecs](#DurationInSecs) _\<double>_] \[-[Enabled](#Enabled) _\<bool>_] \[-[EnableDrainMode](#EnableDrainMode) _\<bool>_] \[-[EnforceScheduleInactiveHost](#EnforceScheduleInactiveHost) _\<bool>_] \[-[ForceServerRebootAfter](#ForceServerRebootAfter) _\<uint>_] \[-[MembersToStart](#MembersToStart) _\<uint>_] \[-[NewName](#NewName) _\<string>_] \[-[OnDisable](#OnDisable) _\<bool>_] \[-[PercentageMembers](#PercentageMembers) _\<uint>_] \[-[PoolMembersType](#PoolMembersType) _\<uint>_] \[-[PowerOnAssignedPoolMembers](#PowerOnAssignedPoolMembers) _\<uint>_] \[-[Repeat](#Repeat) {Never | EveryDay | EveryWeek | Every2Weeks | EveryMonth | EveryYear | SpecificDays}] \[-[SpecificDays](#SpecificDays) {Never | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] \[-[StartDateTime](#StartDateTime) _\<DateTime>_] \[_<_[_CommonParameters_](#CommonParameters)_>_]

**Set-RASSchedule** \[\[-[Name](#Name)] _\<string>_] \[\[-[SiteId](#SiteId)] _\<uint>_] -[ObjType](#ObjType) {RDS | VDI | AVD} \[-[CompleteIn](#CompleteIn) _\<uint>_] \[-[Description](#Description) _\<string>_] \[-[DurationInSecs](#DurationInSecs) _\<double>_] \[-[Enabled](#Enabled) _\<bool>_] \[-[EnableDrainMode](#EnableDrainMode) _\<bool>_] \[-[EnforceScheduleInactiveHost](#EnforceScheduleInactiveHost) _\<bool>_] \[-[ForceServerRebootAfter](#ForceServerRebootAfter) _\<uint>_] \[-[MembersToStart](#MembersToStart) _\<uint>_] \[-[NewName](#NewName) _\<string>_] \[-[OnDisable](#OnDisable) _\<bool>_] \[-[PercentageMembers](#PercentageMembers) _\<uint>_] \[-[PoolMembersType](#PoolMembersType) _\<uint>_] \[-[PowerOnAssignedPoolMembers](#PowerOnAssignedPoolMembers) _\<uint>_] \[-[Repeat](#Repeat) {Never | EveryDay | EveryWeek | Every2Weeks | EveryMonth | EveryYear | SpecificDays}] \[-[SpecificDays](#SpecificDays) {Never | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] \[-[StartDateTime](#StartDateTime) _\<DateTime>_] \[_<_[_CommonParameters_](#CommonParameters)_>_]

## DESCRIPTION

Modifies a Schedule property.

## PARAMETERS

-**Name \<string>**\
Scheduler job name.

```
        Required?                    false

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**SiteId \<uint>**\
Site ID from which to retrieve the schedule job.

```
        Required?                    false

        Position?                    1

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**Id \<uint>**\
Scheduler job ID.

```
        Required?                    true

        Position?                    0

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**ObjType <**[**ScheduleObjType**](../classes-and-enumerations/scheduleobjtype)**>**\
Schedule object type.

Possible values: RDS, VDI, AVD

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**InputObject <**[**Schedule**](../classes-and-enumerations/schedule)**>**\
An object of type Schedule representing the target scheduler job.

To obtain the object, use the Get-RASSchedule command."

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       true (ByValue)

        Accept wildcard characters?  false
```

-**NewName \<string>**\
A new name for the scheduler job.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**Enabled \<bool>**\
Whether to enable or disable the schedule.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**Description \<string>**\
Schedule description.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**StartDateTime \<DateTime>**\
Start time. Default: Now.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**DurationInSecs \<double>**\
Duration in seconds.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**Repeat <**[**RepeatType**](../classes-and-enumerations/repeattype)**>**\
Repeat interval. Default: EveryWeek

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

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

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**SpecificDays <**[**RepeatSpecificDays**](../classes-and-enumerations/repeatspecificdays)**>**\
Repeat on Specific Days.

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

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**CompleteIn \<uint>**\
The duration of the scheduler task in minutes.

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

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**PoolMembersType \<uint>**\
Whether to select the percentage or specific number of members to be started

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**PercentageMembers \<uint>**\
Percentage of members to be started

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**MembersToStart \<uint>**\
Specific number of members to be started

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**PowerOnAssignedPoolMembers \<uint>**\
Power On Assigned Pool Members

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**EnableDrainMode \<bool>**\
Whether to enable Drain Mode

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**ForceServerRebootAfter \<uint>**\
Force server reboot after the specified time in seconds

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**EnforceScheduleInactiveHost \<bool>**\
Enforce schedule for currently inactive host

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**OnDisable \<bool>**\
What action to take on Disable

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

\<CommonParameters>

```
        This cmdlet supports the common parameters: Verbose, Debug,

        ErrorAction, ErrorVariable, WarningAction, WarningVariable,

        OutBuffer, PipelineVariable, and OutVariable. For more information, see 

        about_CommonParameters documentation. 
```

## INPUTS

[Schedule](../classes-and-enumerations/schedule)

## OUTPUTS

-none-

## EXAMPLES

**---------- EXAMPLE 1 ----------**

Set-RASSchedule "My Schedule" -ObjType RDS -Enabled $False

Disables the Schedule property specified by name.\
&#xNAN;**---------- EXAMPLE 2 ----------**

Set-RASSchedule -Id 10 -ObjType RDS -Enabled $False

Disables the Schedule property specified by ID.\
&#xNAN;**---------- EXAMPLE 3 ----------**

Set-RASSchedule $Schedule -Enabled $False

Disables the Schedule property specified by the $Schedule variable (an object of type Schedule).

## RELATED LINKS

* [New-RASSchedule](new-rasschedule)
* [Get-RASSchedule](get-rasschedule)
* [Remove-RASSchedule](remove-rasschedule)
* [Add-RASScheduleMessage](add-rasschedulemessage)
* [Remove-RASScheduleMessage](remove-rasschedulemessage)
