New-RedgateMonitorAlertSuppressionWindow
Published 18 April 2024
Creates an alert suppression window object.
Syntax
New-RedgateMonitorAlertSuppressionWindow -NonRecurring -Name <string> -AlertTypeGroupToSuppress <AlertSuppressionAlertTypeGroupToSuppress> -AlertSuppressionLevel <AlertSuppressionLevel> -Start <datetime> -Duration <timespan> [-BaseMonitor <BaseMonitor>] [-Targets <IdentifiableObject[]>] [-Id <int>] [<CommonParameters>] New-RedgateMonitorAlertSuppressionWindow -Weekly -Name <string> -AlertTypeGroupToSuppress <AlertSuppressionAlertTypeGroupToSuppress> -AlertSuppressionLevel <AlertSuppressionLevel> -StartTime <timespan> -Duration <timespan> -Days <DayOfWeek[]> [-BaseMonitor <BaseMonitor>] [-Targets <IdentifiableObject[]>] [-Id <int>] [<CommonParameters>] New-RedgateMonitorAlertSuppressionWindow -Monthly -Name <string> -AlertTypeGroupToSuppress <AlertSuppressionAlertTypeGroupToSuppress> -AlertSuppressionLevel <AlertSuppressionLevel> -StartTime <timespan> -Duration <timespan> -Day <DayOfWeek> -ScheduleSetPosition <AlertSuppressionScheduleSetPosition> [-BaseMonitor <BaseMonitor>] [-Targets <IdentifiableObject[]>] [-Id <int>] [<CommonParameters>]
Description
Creates an alert suppression window that can be used to suppress alerts or their notifications within one or more specified windows of time, for specific monitored servers.
Parameters
-NonRecurring
<SwitchParameter>
Indicates a non-recurring window.
Aliases | None |
Required? | true |
Position? | named |
Default Value | False |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Weekly
<SwitchParameter>
Indicates a weekly recurring window.
Aliases | None |
Required? | true |
Position? | named |
Default Value | False |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Monthly
<SwitchParameter>
Indicates a monthly recurring window.
Aliases | None |
Required? | true |
Position? | named |
Default Value | False |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Name
<String>
Unique name for the window
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-AlertTypeGroupToSuppress
<AlertSuppressionAlertTypeGroupToSuppress>
Type of alerts that will be affected by this alert suppression window
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-AlertSuppressionLevel
<AlertSuppressionLevel>
Indicates the suppression level during this alert suppression window
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Start
<DateTime>
Date and time for the start of the non-recurring alert suppression window
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-StartTime
<TimeSpan>
Start time for the weekly and montly alert suppression window
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Duration
<TimeSpan>
Duration of the alert suppression window
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Days
<DayOfWeek[]>
Days in which the weekly alert suppression window will be active
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Day
<DayOfWeek>
Day in which the monthly alert suppression window will be active
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-ScheduleSetPosition
<AlertSuppressionScheduleSetPosition>
Relative week in which the monthly alert suppression window will be active
Aliases | None |
Required? | true |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-BaseMonitor
<BaseMonitor>
Base monitor to which the alert suppression will belong to. If not provided will try to be inferred from the given Targets
Aliases | None |
Required? | false |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Targets
<IdentifiableObject[]>
Target monitored objects to which the window will be applied to. The targets must belong to the same base monitor. Supported objects are: Cluster, Machines, SqlServer Instances, Azure Sql Server, Azure Sql Databases, Groups, Tags
Aliases | None |
Required? | false |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Id
<Int32>
Undefined Id field for compatibility. No value should be passed here.
Aliases | None |
Required? | false |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-ProgressAction
<ActionPreference>
{{ Fill ProgressAction Description }}
Aliases | None |
Required? | false |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
-
None.
You cannot pipe input to this cmdlet.
Return values
The output type is the type of the objects that the cmdlet emits.
-
[AlertSuppressionWindow]
Examples
-------------------------- EXAMPLE 1 --------------------------
$targets = Get-RedgateMonitorMonitoredObject -Type Machine | where Name -like 'prod*' $weekendWindow = New-RedgateMonitorAlertSuppressionWindow -Weekly ` -Name 'Weekend window' ` -AlertTypeGroupToSuppress 'AllAlerts' ` -AlertSuppressionLevel 'AlertsAndNotifications' ` -StartTime '08:00' ` -Duration '01:30' ` -Days 'Saturday','Sunday' ` -Targets $targets