# New-RASSchedule.md

## NAME

New-RASSchedule

## SYNOPSIS

Creates a new Schedule.

## SYNTAX

**New-RASSchedule** \[[Name](#name-string)] *(string)* \[\[-[SiteId](#siteid-string)] *(uint)*] -[Action](#Action) {Disable | Reboot | Startup | Shutdown | Recreate} -[HostAzureID](#hostazureid-string) *(string)* -[ObjType](#objtype) {RDS | VDI | AVD} -[PoolId](#poolid-string) *(uint)* -[TargetType](#TargetType) {Host | HostPool} \[[CompleteIn](#completein-string) *(uint)*] \[[Description](#description-string) *(string)*] \[[DurationInSecs](#durationinsecs-string) *(double)*] \[[Enabled](#enabled-string) *(bool)*] \[[EnableDrainMode](#enabledrainmode-string) *(bool)*] \[[EnforceScheduleInactiveHost](#enforcescheduleinactivehost-string) *(bool)*] \[[ForceServerRebootAfter](#forceserverrebootafter-string) *(uint)*] \[[MembersToStart](#memberstostart-string) *(uint)*] \[[OnDisable](#ondisable-string) *(bool)*] \[[PercentageMembers](#percentagemembers-string) *(uint)*] \[[PoolMembersType](#poolmemberstype-string) *(uint)*] \[[PowerOnAssignedPoolMembers](#poweronassignedpoolmembers-string) *(uint)*] \[-[Repeat](#Repeat) {Never | EveryDay | EveryWeek | Every2Weeks | EveryMonth | EveryYear | SpecificDays}] \[-[SpecificDays](#SpecificDays) {Never | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] \[[StartDateTime](#startdatetime-string) *(DateTime)*] \[[Type](#type-string) *(uint)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

**New-RASSchedule** \[[Name](#name-string)] *(string)* \[\[-[SiteId](#siteid-string)] *(uint)*] -[Action](#Action) {Disable | Reboot | Startup | Shutdown | Recreate} -[GuestName](#guestname-string) *(string)* -[GUID](#guid-string) *(string)* -[ObjType](#objtype) {RDS | VDI | AVD} -[PoolId](#poolid-string) *(uint)* -[TargetType](#TargetType) {Host | HostPool} \[[CompleteIn](#completein-string) *(uint)*] \[[Description](#description-string) *(string)*] \[[DurationInSecs](#durationinsecs-string) *(double)*] \[[Enabled](#enabled-string) *(bool)*] \[[EnableDrainMode](#enabledrainmode-string) *(bool)*] \[[EnforceScheduleInactiveHost](#enforcescheduleinactivehost-string) *(bool)*] \[[ForceServerRebootAfter](#forceserverrebootafter-string) *(uint)*] \[[MembersToStart](#memberstostart-string) *(uint)*] \[[OnDisable](#ondisable-string) *(bool)*] \[[PercentageMembers](#percentagemembers-string) *(uint)*] \[[PoolMembersType](#poolmemberstype-string) *(uint)*] \[[PowerOnAssignedPoolMembers](#poweronassignedpoolmembers-string) *(uint)*] \[-[Repeat](#Repeat) {Never | EveryDay | EveryWeek | Every2Weeks | EveryMonth | EveryYear | SpecificDays}] \[-[SpecificDays](#SpecificDays) {Never | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] \[[StartDateTime](#startdatetime-string) *(DateTime)*] \[[Type](#type-string) *(uint)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

**New-RASSchedule** \[[Name](#name-string)] *(string)* \[\[-[SiteId](#siteid-string)] *(uint)*] -[Action](#Action) {Disable | Reboot | Startup | Shutdown | Recreate} -[ObjType](#objtype) {RDS | VDI | AVD} -[TargetID](#targetid-string) *(uint)* -[TargetType](#TargetType) {Host | HostPool} \[[CompleteIn](#completein-string) *(uint)*] \[[Description](#description-string) *(string)*] \[[DurationInSecs](#durationinsecs-string) *(double)*] \[[Enabled](#enabled-string) *(bool)*] \[[EnableDrainMode](#enabledrainmode-string) *(bool)*] \[[EnforceScheduleInactiveHost](#enforcescheduleinactivehost-string) *(bool)*] \[[ForceServerRebootAfter](#forceserverrebootafter-string) *(uint)*] \[[MembersToStart](#memberstostart-string) *(uint)*] \[[OnDisable](#ondisable-string) *(bool)*] \[[PercentageMembers](#percentagemembers-string) *(uint)*] \[[PoolMembersType](#poolmemberstype-string) *(uint)*] \[[PowerOnAssignedPoolMembers](#poweronassignedpoolmembers-string) *(uint)*] \[-[Repeat](#Repeat) {Never | EveryDay | EveryWeek | Every2Weeks | EveryMonth | EveryYear | SpecificDays}] \[-[SpecificDays](#SpecificDays) {Never | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] \[[StartDateTime](#startdatetime-string) *(DateTime)*] \[[Type](#type-string) *(uint)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

## DESCRIPTION

Creates a new Schedule property.

## PARAMETERS

## Name (string)

Schedule name.

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SiteId (uint)

Site ID from which to retrieve the schedule.

```
        Required?                    false

        Position?                    1

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ObjType ([ScheduleObjType](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/scheduleobjtype))

Schedule object type.

Possible values: RDS, VDI, AVD

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Action ([ScheduleActionType](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/scheduleactiontype))

Schedule Action Type

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

```
        Required?                    true

        Position?                    named

        Default value                Disable

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## TargetType

([ScheduleTargetType](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/scheduletargettype)) Schedule target type. Accepted values: Host, Host Pool.

Possible values: Host, HostPool

```
        Required?                    true

        Position?                    named

        Default value                Host

        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
```

## Type (uint)

Schedule type

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## TargetID (uint)

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

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PoolId (uint)

The TargetNativeHost Pool Id

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## GUID (string)

The TargetNativeHost GUID

```
        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## GuestName (string)

The TargetNativeHost Guest Name

```
        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## HostAzureID (string)

The TargetNativeHost Host Azure ID

```
        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## StartDateTime (DateTime)

Start time. Default: Now.

```
        Required?                    false

        Position?                    named

        Default value                2/28/2025 5:50:23 PM

        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](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/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                EveryWeek

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SpecificDays

([RepeatSpecificDays](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/repeatspecificdays)) Repeat on Specific Days.

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

```
        Required?                    false

        Position?                    named

        Default value                Never

        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

-none-

## OUTPUTS

[Schedule](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/schedule)

## EXAMPLES

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

New-RASSchedule "My Schedule" -ObjType RDS -Action Disable -TargetType Host

Creates a new Schedule property with the specified name.

## RELATED LINKS

* [Get-RASSchedule](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasschedule)
* [Set-RASSchedule](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-rasschedule)
* [Remove-RASSchedule](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/remove-rasschedule)
* [Add-RASScheduleMessage](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/add-rasschedulemessage)
