New-RDSScheduleDisable

NAME

New-RDSScheduleDisable

SYNOPSIS

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

SYNTAX

New-RDSScheduleDisable -EndDateTime <DateTime> -Name <string> -StartDateTime <DateTime> -TargetType <SchedTargetType> {Server | ServerGroup} [-Description <string>] [-DisableAction <DisableAction> {KeepSessionState | DisconnectActiveSessions | ResetAllSessions}] [-EnforceOnInactive <bool>] [-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 "Disable (server or group)".

PARAMETERS


-DisableAction <DisableAction>
The action that should be performed when the server is disabled.

Accepted values: KeepSessionState, DisconnectActiveSessions, ResetAllSessions.

Possible values: KeepSessionState, DisconnectActiveSessions, ResetAllSessions

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

-EndDateTime <DateTime>
The job end time

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

-End <DateTime>
The job end time

This is an alias of the EndDateTime parameter.

        Required?                    true
        Position?                    named
        Default value                1/1/0001 12:00:00 AM
        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-RDSScheduleDisable

Creates a new schedule job with the specified settings.

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

New-RDSScheduleDisable -Name "schedule_job" -EndDateTime "11/06/2019 17:10:32" -TargetType Server -StartDateTime "11/06/2019 16:10:00" -TargetServer $rds

Creates a new schedule job for given target RDS with specified start and end time.

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

New-RDSScheduleDisable -DisableAction KeepSessionState -Name "schedule_job_2" -TargetType Server -StartDateTime "09/08/2019 12:55:00" -EndDateTime "09/08/2019 17:10:00" -TargetServer $rds -Repeat EveryWeek -Description "Weekly job"

Creates a new schedule job for given target RDS with specified start and end time, which repeats every week.

RELATED LINKS