Suspend-CMAlert

Suspends monitoring alerts.

Syntax

Suspend-CMAlert
       -Id <String>
       [-Comment <String>]
       -SkipUntil <DateTime>
       [-PassThru]
       [-DisableWildcardHandling]
       [-ForceWildcardHandling]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Suspend-CMAlert
       -InputObject <IResultObject>
       [-Comment <String>]
       -SkipUntil <DateTime>
       [-PassThru]
       [-DisableWildcardHandling]
       [-ForceWildcardHandling]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Suspend-CMAlert
       -Name <String>
       [-Comment <String>]
       -SkipUntil <DateTime>
       [-PassThru]
       [-DisableWildcardHandling]
       [-ForceWildcardHandling]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

The Suspend-CMAlert cmdlet suspends monitoring of an alert until a specified date. At that time, Microsoft System Center Configuration Manager updates the state of the alert. You can suspend an alert only when it is enabled. If you do not specify the SkipUntil parameter, the alert is suspended indefinitely.

Examples

Example 1: Suspend an alert by using ID

PS C:\> Suspend-CMAlert -Id "16777219" -Comments "Postponing alert evaluation" -SkipUntil "Wednesday, August 20, 2012 4:03:17 PM"

This command suspends an alert that has the Id 16777219 until the time specified by SkipUntil, and adds a comment to the alert.

Example 2: Suspend an alert by using alert object variable

PS C:\> $AlertObj = Get-CMAlert -Id "16777221"
PS C:\> Suspend-CMAlert -InputObject $AlertObj -Comments "Postponing alert evaluation" -SkipUntil "4/8/2012 8:04:39 PM"

The first command gets the alert object that has the ID 16777221, and then stores the object in the $AlertObj variable.

The second command suspends the alert stored in $AlertObj until the time specified by SkipUntil, and adds a comment to the alert.

Required Parameters

-Id

Specifies an alert ID. You can obtain the ID of an alert by using the Get-CMAlert cmdlet.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies a CMAlert object. To obtain a CMAlert object, use the Get-CMAlert cmdlet.

Type:IResultObject
Aliases:Alert
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of an alert. You can obtain the name of an alert by using Get-CMAlert.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SkipUntil

Specifies a specific date and time to start evaluation of the alert. Enter a DateTime object or a string that can be converted to a time, such as April 19, 2012 15:00, 12/31/2013 9:00 PM, or 3am. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date.

If you do not specify an element of the DateTime object, such as seconds, that element of the job trigger is not changed. If the original job trigger did not include a DateTime object and you omit an element, the job trigger is created with the corresponding element from the current date and time.

DateTime objects, and strings that are converted to DateTime objects, are automatically adjusted to be compatible with the date and time formats selected for the local computer in Region and Language in Control Panel.

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

Optional Parameters

-Comment

Specifies a comment to add to the alert. You can use the comment to record the explanation for suspending the alert.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-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
-PassThru
Type:SwitchParameter
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