New-RASRDSScheduleDisable

NAME

New-RASRDSScheduleDisable

SYNOPSIS

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

SYNTAX

New-RASRDSScheduleDisable -EndDateTime <DateTime> -Name <string> -StartDateTime <DateTime> -TargetServer <RDS> -TargetType <SchedTargetType> {Server | ServerGroup} [-Description <string>] [-DisableAction <DisableAction> {KeepSessionState | DisconnectActiveSessions | ResetAllSessions}] [-Enabled <bool>] [-EnforceOnInactive <bool>] [-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-RASRDSScheduleDisable -EndDateTime <DateTime> -Name <string> -StartDateTime <DateTime> -TargetGroup <RDSGroup> -TargetType <SchedTargetType> {Server | ServerGroup} [-Description <string>] [-DisableAction <DisableAction> {KeepSessionState | DisconnectActiveSessions | ResetAllSessions}] [-Enabled <bool>] [-EnforceOnInactive <bool>] [-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-RASRDSScheduleDisable -EndDateTime <DateTime> -Name <string> -StartDateTime <DateTime> -TargetIds <uint[]> -TargetType <SchedTargetType> {Server | ServerGroup} [-Description <string>] [-DisableAction <DisableAction> {KeepSessionState | DisconnectActiveSessions | ResetAllSessions}] [-Enabled <bool>] [-EnforceOnInactive <bool>] [-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 "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

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

Creates a new schedule job with the specified settings.

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

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