New-RASRDSScheduleReboot

NAME

New-RASRDSScheduleReboot

SYNOPSIS

Creates an RD Session Host scheduler job of type "Reboot (server or group)".

SYNTAX

New-RASRDSScheduleReboot -Name <string> -StartDateTime <DateTime> -TargetServer <RDS> -TargetType <SchedTargetType> {Server | ServerGroup} [-CompleteRebootInSecs <uint>] [-Description <string>] [-DrainMode <SwitchParameter>] [-Enabled <bool>] [-EnforceOnInactive <bool>] [-ForceRebootAfterSecs <uint>] [-ForceRebootDelayMins <uint>] [-Message <string>] [-MessageTitle <string>] [-Repeat <RepeatType> {Never | EveryDay | EveryWeek | Every2Weeks | EveryMonth | EveryYear | SpecificDays}] [-SendMsgBeforeMins <uint>] [-SiteId <uint>] [-SpecificDays <RepeatSpecificDays> {Never | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [<CommonParameters>]

New-RASRDSScheduleReboot -Name <string> -StartDateTime <DateTime> -TargetGroup <RDSGroup> -TargetType <SchedTargetType> {Server | ServerGroup} [-CompleteRebootInSecs <uint>] [-Description <string>] [-DrainMode <SwitchParameter>] [-Enabled <bool>] [-EnforceOnInactive <bool>] [-ForceRebootAfterSecs <uint>] [-ForceRebootDelayMins <uint>] [-Message <string>] [-MessageTitle <string>] [-Repeat <RepeatType> {Never | EveryDay | EveryWeek | Every2Weeks | EveryMonth | EveryYear | SpecificDays}] [-SendMsgBeforeMins <uint>] [-SiteId <uint>] [-SpecificDays <RepeatSpecificDays> {Never | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [<CommonParameters>]

New-RASRDSScheduleReboot -Name <string> -StartDateTime <DateTime> -TargetIds <uint[]> -TargetType <SchedTargetType> {Server | ServerGroup} [-CompleteRebootInSecs <uint>] [-Description <string>] [-DrainMode <SwitchParameter>] [-Enabled <bool>] [-EnforceOnInactive <bool>] [-ForceRebootAfterSecs <uint>] [-ForceRebootDelayMins <uint>] [-Message <string>] [-MessageTitle <string>] [-Repeat <RepeatType> {Never | EveryDay | EveryWeek | Every2Weeks | EveryMonth | EveryYear | SpecificDays}] [-SendMsgBeforeMins <uint>] [-SiteId <uint>] [-SpecificDays <RepeatSpecificDays> {Never | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}] [<CommonParameters>]

DESCRIPTION

Creates an RD Session Host scheduler job of type "Reboot (server or group)".

PARAMETERS


-DrainMode <SwitchParameter>
Whether to enable or disable the Drain mode.

        Required?                    false
        Position?                    named
        Default value                False
        Accept pipeline input?       false
        Accept wildcard characters?  false

-ForceRebootDelayMins <uint>
Force reboot after (in minutes).

        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-ForceRebootAfterSecs <uint>
Force reboot after (in seconds).

        Required?                    false
        Position?                    named
        Default value                3600
        Accept pipeline input?       false
        Accept wildcard characters?  false

-CompleteRebootInSecs <uint>
Complete in (seconds).

        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-Name <string>
Scheduler job name.

        Required?                    true
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-SiteId <uint>
The site ID to which to add the scheduler job.

If the parameter is omitted, the Licensing Server site ID will be used.

        Required?                    false
        Position?                    named
        Default value                0
        Accept pipeline input?       false
        Accept wildcard characters?  false

-Enabled <bool>
Whether to enable or disable the scheduler job.

        Required?                    false
        Position?                    named
        Default value                True
        Accept pipeline input?       false
        Accept wildcard characters?  false

-Description <string>
Scheduler job description.

        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-TargetServer <RDS>
The target RD Session Host server if the TargetType parameter is set to 'Server'.

        Required?                    true
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-TargetGroup <RDS>
The target server group if the TargetType parameter is set to ServerGroup.

        Required?                    true
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-TargetIds <uint[]>
The target RD Session Host server or server group Ids depending on the TargetType parameter.

        Required?                    true
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-StartDateTime <DateTime>
Start time.

        Required?                    true
        Position?                    named
        Default value                1/1/0001 12:00:00 AM
        Accept pipeline input?       false
        Accept wildcard characters?  false

-Repeat <RepeatType>
Repeat interval.

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

-EnforceOnInactive <bool>
Enforce the schedule even when the target is inactive.

        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-MessageTitle <string>
The title of the message.

        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-Message <string>
A message that should be sent to users before the job starts.

        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-SendMsgBeforeMins <uint>
Time interval in minutes before the job starts when the message to users should be sent.

        Required?                    false
        Position?                    named
        Default value                15
        Accept pipeline input?       false
        Accept wildcard characters?  false

-TargetType <SchedTargetType>
Scheduler job target type. Accepted values: Server, ServerGroup.

Possible values: Server, ServerGroup

        Required?                    true
        Position?                    named
        Default value                Server
        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

RDSSchedItem

EXAMPLES


---------- EXAMPLE 1 ----------

New-RASRDSScheduleReboot

Creates a schedule job with the specified settings.

---------- EXAMPLE 2 ----------

New-RASRDSScheduleReboot -Name "schedule_job" -StartDateTime "11/06/2019 16:27:04" -TargetType Server -TargetServer $rds

Creates a schedule job with the specified settings, with a given start time.

---------- EXAMPLE 3 ----------

New-RASRDSScheduleReboot -Name "schedule_reboot_2" -TargetType Server -StartDateTime "09/08/2019 12:55:00" -TargetServer $rds -Repeat EveryWeek -Description "Weekly reboot"

Creates a schedule job with the specified settings, with a given start time which repeats every week.

RELATED LINKS