The Add-SCOMSubscriberSchedule cmdlet adds a new schedule entry for a notification subscriber.
Notification subscribers are users who receive notifications when System Center 2016 - Operations Manager raises an alert on a monitored system.
If you do not add entries to a subscriber's existing schedule, the subscriber continues to receive notifications.
Examples
Example 1: Add a schedule for a notification subscriber
This command adds a schedule window from 9 A.M.
to 5 P.M.
on Mondays, Wednesdays, and Fridays in all date ranges for a notification subscriber named Katarina.
The command uses the Get-SCOMNotificationSubscriber cmdlet to get the specified subscriber and passes that subscriber to the Add-SCOMSubscriberSchedule cmdlet by using the pipeline operator.
Example 2: Add multiple schedule entries for a notification subscriber
This command adds two schedule entries to the notification subscriber named Cesar in the USA Central time zone.
The command uses the Get-SCOMNotificationSubscriber cmdlet to get the specified subscriber and passes that subscriber to the Add-SCOMSubscriberSchedule cmdlet by using the pipeline operator.
The command adds the entry with the specified values.
The command specifies the PassThru parameter in order to pass the user to another instance of the Add-SCOMSubscriberSchedule cmdlet by using the pipeline operator.
The command adds a second schedule entry with the specified values.
Parameters
-AllDay
Indicates that the schedule entry applies to the whole day.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
AllDay
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ComputerName
Specifies an array of names of computers.
The cmdlet establishes temporary connections with management groups for these computers.
Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name (FQDN).
To specify the local computer, specify the computer name, localhost, or a dot (.).
The computer must run the System Center Data Access service.
If you do not specify this parameter, the default is the computer for the current management group connection.
Parameter properties
Type:
String[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
cf
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Credential
Specifies a PSCredential object for the management group connection.
To obtain a PSCredential object, use the Get-Credential cmdlet.
For more information, type "Get-Help Get-Credential".
If you specify a computer in the ComputerName parameter, use an account that has access to that computer.
The default is the current user.
Parameter properties
Type:
PSCredential
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DayOfWeek
Specifies the days of the week that the schedule entry is valid.
By default, the entry applies to all days of the week.
Parameter properties
Type:
NotificationRecipientScheduleEntryDaysOfWeek
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
3
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-EndDate
Specifies the date at which the schedule entry ends.
If this command does not specify StartDate and EndDate parameters, the schedule entry applies to all dates.
Parameter properties
Type:
DateTime
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-EndTime
Specifies the time at which the schedule entry ends.
Parameter properties
Type:
DateTime
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
To, Until
Parameter sets
StartAndEnd
Position:
2
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Exclude
Indicates that the command excludes the specified times and dates from the schedule.
If this parameter does not appear, the schedule includes only the specified times.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-PassThru
Indicates that the cmdlet creates or modifies an object that a command can use in the pipeline.
By default, this cmdlet does not generate any output.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-SCSession
Specifies an array of Connection objects.
To get Connection objects, specify the Get-SCOMManagementGroupConnection cmdlet.
If this parameter does not appear, the cmdlet uses the active persistent connection to a management group.
Use the SCSession parameter to specify a different persistent connection.
You can create a temporary connection to a management group by using the ComputerName and Credential parameters.
For more information, type "Get-Help about_OpsMgr_Connections".
Parameter properties
Type:
Connection[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-StartDate
Specifies the date at which the schedule entry starts.
If this command does not specify StartDate and EndDate parameters, the schedule entry applies to all dates.
Parameter properties
Type:
DateTime
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-StartTime
Specifies the start time for the schedule entry.
Parameter properties
Type:
DateTime
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
From
Parameter sets
StartAndEnd
Position:
1
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Subscriber
Specifies the notification subscriber.
To obtain a notification subscriber object, use the Get-SCOMNotificationSubscriber cmdlet, or create a new object by using the Add-SCOMNotificationSubscriber cmdlet.
Parameter properties
Type:
NotificationRecipient
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-TimeZone
Specifies the time zone for the schedule entry.
If you specify wildcards as part of the time zone, the cmdlet performs wildcard matching against the display names for time zones.
If this parameter does not appear, the cmdlet defaults to the current user time zone.
Examples of valid values for this parameter are:
UTC+05:00.
United States Eastern time.
Pacific Time.
United States Pacific time.
Amsterdam.
Amsterdam, Berlin, Bern, Rome, Stockholm time.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
wi
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.