New-RDSScheduleReboot

NAME

New-RDSScheduleReboot

SYNOPSIS

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

SYNTAX

New-RDSScheduleReboot -Name <string> -StartDateTime <DateTime> -TargetType <SchedTargetType> {Server | ServerGroup} [-CompleteRebootInSecs <uint>] [-Description <string>] [-DrainMode <SwitchParameter>] [-EnforceOnInactive <bool>] [-ForceRebootDelayMins <uint>] [-Message <string>] [-MessageTitle <string>] [-Repeat <RepeatType> {Never | EveryDay | EveryWeek | Every2Weeks | EveryMonth | EveryYear}] [-SendMsgBeforeMins <uint>] [-SiteId <uint>] [-TargetGroup <RDSGroup>] [-TargetServer <RDS>] [<CommonParameters>]

DESCRIPTION

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

PARAMETERS


-DrainMode <SwitchParameter>
Whether to enables 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                60
        Accept pipeline input?       false
        Accept wildcard characters?  false

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

This is an alias of the ForceRebootDelayMins parameter.

        Required?                    false
        Position?                    named
        Default value                60
        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

-CompleteInSec <uint>
Complete in (seconds).

This is an alias of the CompleteRebootInSecs parameter.

        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

-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

-Description <string>
Scheduler job description.

        Required?                    false
        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

-Start <DateTime>
Start time.

This is an alias of the StartDateTime parameter.

        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

        Required?                    false
        Position?                    named
        Default value                EveryWeek
        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                1
        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

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

        Required?                    false
        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?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

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

        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

RDSSchedItem

EXAMPLES


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

New-RDSScheduleReboot

Creates a schedule job with the specified settings.

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

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