Share via


New-CMSchedule

SYNOPSIS

Crie um token de agenda do Gestor de Configuração.

SYNTAX

RecorrenceNone (Padrão)

New-CMSchedule [-IsUtc] [-Nonrecurring] [-ScheduleString] [-Start <DateTime>] [-DisableWildcardHandling]
 [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

RecorrenceMonthlyByDate

New-CMSchedule -DayOfMonth <Int32> [-IsUtc] [-RecurCount <Int32>] [-ScheduleString] [-Start <DateTime>]
 [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

RecorrenceMonthlyByDateWithDuration

New-CMSchedule -DayOfMonth <Int32> -DurationCount <Int32> -DurationInterval <ScheduleInterval> [-IsUtc]
 [-RecurCount <Int32>] [-ScheduleString] [-Start <DateTime>] [-DisableWildcardHandling]
 [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

RecorrenceMonthlyByDateWithEnd

New-CMSchedule -DayOfMonth <Int32> -End <DateTime> [-IsUtc] [-RecurCount <Int32>] [-ScheduleString]
 [-Start <DateTime>] [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm]
 [<CommonParameters>]

RecorrenceWeekly

New-CMSchedule -DayOfWeek <DayOfWeek> [-IsUtc] [-RecurCount <Int32>] [-ScheduleString] [-Start <DateTime>]
 [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

RecorrenceWeeklyWithDuration

New-CMSchedule -DayOfWeek <DayOfWeek> -DurationCount <Int32> -DurationInterval <ScheduleInterval> [-IsUtc]
 [-RecurCount <Int32>] [-ScheduleString] [-Start <DateTime>] [-DisableWildcardHandling]
 [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

RecorrenceWeeklyWithEnd

New-CMSchedule -DayOfWeek <DayOfWeek> -End <DateTime> [-IsUtc] [-RecurCount <Int32>] [-ScheduleString]
 [-Start <DateTime>] [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm]
 [<CommonParameters>]

RecurMonthlyByWeekday

New-CMSchedule -DayOfWeek <DayOfWeek> [-IsUtc] [-OffsetDay <Int32>] [-RecurCount <Int32>] [-ScheduleString]
 [-Start <DateTime>] -WeekOrder <ScheduleWeekOrder> [-DisableWildcardHandling] [-ForceWildcardHandling]
 [-WhatIf] [-Confirm] [<CommonParameters>]

RecurMonthlyByWeekdayWithDuration

New-CMSchedule -DayOfWeek <DayOfWeek> -DurationCount <Int32> -DurationInterval <ScheduleInterval> [-IsUtc]
 [-OffsetDay <Int32>] [-RecurCount <Int32>] [-ScheduleString] [-Start <DateTime>]
 -WeekOrder <ScheduleWeekOrder> [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm]
 [<CommonParameters>]

RecurMonthlyByWeekdayWithEnd

New-CMSchedule -DayOfWeek <DayOfWeek> -End <DateTime> [-IsUtc] [-OffsetDay <Int32>] [-RecurCount <Int32>]
 [-ScheduleString] [-Start <DateTime>] -WeekOrder <ScheduleWeekOrder> [-DisableWildcardHandling]
 [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

RecorrenceNoneWithDuration

New-CMSchedule -DurationCount <Int32> -DurationInterval <ScheduleInterval> [-IsUtc] [-Nonrecurring]
 [-ScheduleString] [-Start <DateTime>] [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm]
 [<CommonParameters>]

RecurMonthlyLastDayOfMonthWithDuration

New-CMSchedule -DurationCount <Int32> -DurationInterval <ScheduleInterval> [-IsUtc] [-LastDayOfMonth]
 [-RecurCount <Int32>] [-ScheduleString] [-Start <DateTime>] [-DisableWildcardHandling]
 [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

RecorrenceIntervalWithDuration

New-CMSchedule -DurationCount <Int32> -DurationInterval <ScheduleInterval> [-IsUtc] -RecurCount <Int32>
 -RecurInterval <ScheduleInterval> [-ScheduleString] [-Start <DateTime>] [-DisableWildcardHandling]
 [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

RecorrenceNoneWithEnd

New-CMSchedule -End <DateTime> [-IsUtc] [-Nonrecurring] [-ScheduleString] [-Start <DateTime>]
 [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

RecurMonthlyLastDayOfMonthWithEnd

New-CMSchedule -End <DateTime> [-IsUtc] [-LastDayOfMonth] [-RecurCount <Int32>] [-ScheduleString]
 [-Start <DateTime>] [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm]
 [<CommonParameters>]

RecorrenceIntervalWithEnd

New-CMSchedule -End <DateTime> [-IsUtc] -RecurCount <Int32> -RecurInterval <ScheduleInterval> [-ScheduleString]
 [-Start <DateTime>] [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm]
 [<CommonParameters>]

RecurMonthlyLastDayOfMonth

New-CMSchedule [-IsUtc] [-LastDayOfMonth] [-RecurCount <Int32>] [-ScheduleString] [-Start <DateTime>]
 [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

RecorrenceInterval

New-CMSchedule [-IsUtc] -RecurCount <Int32> -RecurInterval <ScheduleInterval> [-ScheduleString]
 [-Start <DateTime>] [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

O cmdlet New-CMSchedule cria um símbolo de programação no Gestor de Configuração. Crie fichas de horário para agendar eventos com frequências diferentes, como diariamente, semanalmente e mensalmente.

Para descodificar e codificar fichas de programação dentro e a partir de uma cadeia de intervalo, utilize o cmdlet Convert-CMSchedule. Em seguida, pode utilizar as cadeias de intervalo para definir propriedades de agendagem quando define ou modifica objetos do Gestor de Configuração.

Nota

Executar cmdlets do Gestor de Configuração a partir da unidade do site do Gestor de Configuração, por exemplo PS XYZ:\> . Para mais informações, consulte a partida.

EXAMPLES

Exemplo 1: Criar um símbolo de horário

Este comando cria um token de horário que especifica que o evento ocorre no último dia do mês na data e hora especificadas (quarta-feira, 5 de agosto de 2020 17:46:03 Hora do Pacífico).

$schedToken1 = New-CMSchedule -DayOfMonth 0 -Start "2020-08-05T17:46:03.7236084-07:00"

Exemplo 2: Criar um calendário de compensação

O exemplo a seguir cria o seguinte horário:

  • Começa na data atual
  • Na segunda segunda-feira do mês
  • Repete-se uma vez
$schedToken2 = New-CMSchedule -Start (Get-Date) -DayOfWeek Monday -WeekOrder Second -RecurCount 1 -OffsetDay 0

Exemplo 3: Criar um horário para correr diariamente

Este exemplo cria uma agenda simples que ocorre diariamente para sempre. Pode utilizar este tipo de programação quando implementar uma linha de base de configuração.

New-CMSchedule -DurationInterval Days -DurationCount 0 -RecurInterval Days -RecurCount 1

PARAMETERS

-Confirm

Solicita a sua confirmação antes de executar o cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DayOfMonth

Especifica o dia do mês em que o evento ocorre. Os valores válidos variam de 0 a 31. O valor predefinido é 0 , o que indica o último dia do mês.

Type: Int32
Parameter Sets: RecurrenceMonthlyByDate, RecurrenceMonthlyByDateWithDuration, RecurrenceMonthlyByDateWithEnd
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

- DayOfWeek

Especifica o dia da semana quando o evento ocorre.

Type: DayOfWeek
Parameter Sets: RecurrenceWeekly, RecurrenceWeeklyWithDuration, RecurrenceWeeklyWithEnd, RecurMonthlyByWeekday, RecurMonthlyByWeekdayWithDuration, RecurMonthlyByWeekdayWithEnd
Aliases:
Accepted values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableWildcardHandling

Este parâmetro trata os caracteres wildcard como valores de caracteres literais. Não pode combiná-lo com ForceWildcardHandling.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Duração Contagem

Especifica o número de dias durante os quais ocorre o evento agendado. Os valores válidos variam de 0 a 31. O valor predefinido é 0 , o que indica que a ação programada continua indefinidamente.

Type: Int32
Parameter Sets: RecurrenceMonthlyByDateWithDuration, RecurrenceWeeklyWithDuration, RecurMonthlyByWeekdayWithDuration, RecurrenceNoneWithDuration, RecurMonthlyLastDayOfMonthWithDuration, RecurrenceIntervalWithDuration
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DuraçãoInterval

Especifica a hora em que o evento ocorre.

Type: ScheduleInterval
Parameter Sets: RecurrenceMonthlyByDateWithDuration, RecurrenceWeeklyWithDuration, RecurMonthlyByWeekdayWithDuration, RecurrenceNoneWithDuration, RecurMonthlyLastDayOfMonthWithDuration, RecurrenceIntervalWithDuration
Aliases:
Accepted values: Minutes, Hours, Days

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

- Fim

Especifica a data e a hora em que o evento agendado termina.

Type: DateTime
Parameter Sets: RecurrenceMonthlyByDateWithEnd, RecurrenceWeeklyWithEnd, RecurMonthlyByWeekdayWithEnd, RecurrenceNoneWithEnd, RecurMonthlyLastDayOfMonthWithEnd, RecurrenceIntervalWithEnd
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForceWildcardHandling

Este parâmetro processa caracteres wildcard e pode levar a um comportamento inesperado (não recomendado). Não é possível combiná-lo com DisableWildcardHandling.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Isutc

Indica que o tempo é tempo universal coordenado (UTC).

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LastDayOfMonth

Indica que o evento ocorre mensalmente no último dia do mês.

Type: SwitchParameter
Parameter Sets: RecurMonthlyLastDayOfMonthWithDuration, RecurMonthlyLastDayOfMonthWithEnd, RecurMonthlyLastDayOfMonth
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Não recorrente

Indica que o evento agendado não se repete.

Type: SwitchParameter
Parameter Sets: RecurrenceNone, RecurrenceNoneWithDuration, RecurrenceNoneWithEnd
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Dia da Compensação

A partir da versão 1906, use este parâmetro para configurar uma compensação como mensalmente durante a semana.

Type: Int32
Parameter Sets: RecurMonthlyByWeekday, RecurMonthlyByWeekdayWithDuration, RecurMonthlyByWeekdayWithEnd
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Recurcount

Especifica o número de recorrências do evento agendado.

Type: Int32
Parameter Sets: RecurrenceMonthlyByDate, RecurrenceMonthlyByDateWithDuration, RecurrenceMonthlyByDateWithEnd, RecurrenceWeekly, RecurrenceWeeklyWithDuration, RecurrenceWeeklyWithEnd, RecurMonthlyByWeekday, RecurMonthlyByWeekdayWithDuration, RecurMonthlyByWeekdayWithEnd, RecurMonthlyLastDayOfMonthWithDuration, RecurMonthlyLastDayOfMonthWithEnd, RecurMonthlyLastDayOfMonth
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: Int32
Parameter Sets: RecurrenceIntervalWithDuration, RecurrenceIntervalWithEnd, RecurrenceInterval
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Recurval

Especifica a hora em que o evento agendado repete-se.

Type: ScheduleInterval
Parameter Sets: RecurrenceIntervalWithDuration, RecurrenceIntervalWithEnd, RecurrenceInterval
Aliases:
Accepted values: Minutes, Hours, Days

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgendarDamento

Indica que o token do calendário é convertido para uma cadeia de intervalo.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Começar

Especifica a data e a hora em que ocorre o evento agendado.

Type: DateTime
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

- Ordem da Semana

Especifica a semana do mês em que o evento ocorre. O valor predefinido é Last (0).

Type: ScheduleWeekOrder
Parameter Sets: RecurMonthlyByWeekday, RecurMonthlyByWeekdayWithDuration, RecurMonthlyByWeekdayWithEnd
Aliases:
Accepted values: Last, First, Second, Third, Fourth

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

- O QueIf

Apresenta o que aconteceria mediante a execução do cmdlet. O comandante não funciona.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

Este cmdlet suporta os parâmetros comuns: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction e -WarningVariable. Para mais informações, consulte about_CommonParameters.

INPUTS

Nenhuma

OUTPUTS

IResultObject#SMS_ScheduleToken

Sistema.String

NOTAS

Converte-CMSchedule