New-CMSchedule

Creates a schedule token.

Syntax

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

Description

The New-CMSchedule cmdlet creates a schedule token. In Microsoft System Center Configuration Manager, you use schedule tokens to configure scheduling information. You can create schedule tokens to schedule events with differing frequencies such as daily, weekly, and monthly.

Use the Convert-CMSchedule cmdlet to decode and encode schedule tokens into and from an interval string. You can then use the interval strings to set schedule properties when you define or modify System Center Configuration Manager objects.

Examples

Example 1: Create a schedule token

PS C:\> New-CMSchedule -DayOfMonth 0 -DateTime "20120105185728.303000+000"

This command creates a schedule token that specifies that the event occurs on the last day of the month at the specified date and time.

Required Parameters

-DayOfMonth

Specifies the day of the month when the event occurs. Valid values range from 0 through 31. The default value is 0, which indicates the last day of the month.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DayOfWeek

Specifies the day of the week when the event occurs. The acceptable values for this parameter are:

  • Sunday (default)
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
Type:DayOfWeek
Parameter Sets:Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DurationCount

Specifies the number of days during which the scheduled event occurs. Valid values range from 0 through 31. The default value is 0, which indicates that the scheduled action continues indefinitely.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DurationInterval

Specifies the time when the event occurs.

Type:ScheduleInterval
Parameter Sets:Minutes, Hours, Days
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-End

Specifies the date and time when the scheduled event ends.

Type:DateTime
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LastDayOfMonth

Indicates that the event occurs monthly on the last day of the month.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Nonrecurring

Indicates that the scheduled event does not recur.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RecurInterval

Specifies the time when the scheduled event recurs.

Type:ScheduleInterval
Parameter Sets:Minutes, Hours, Days
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WeekOrder

Specifies the week of the month when the event occurs. The acceptable values for this parameter are:

  • 0. Last (default)
  • 1. First
  • 2. Second
  • 3. Third
  • 4. Fourth
Type:ScheduleWeekOrder
Parameter Sets:Last, First, Second, Third, Fourth
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IsUtc

Indicates that the time is Coordinated Universal Time (UTC).

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RecurCount

Specifies the number of recurrences of the scheduled event.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ScheduleString

Indicates that the schedule token is converted to an interval string.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Start

Specifies the date and time when the scheduled event occurs.

Type:DateTime
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False