Suspend-CMAlert

Suspend-CMAlert

Suspends monitoring alerts.

Syntax

Parameter Set: SearchByIdMandatory
Suspend-CMAlert -Id <String> -SkipUntil <DateTime> [-Comment <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByNameMandatory
Suspend-CMAlert -Name <String> -SkipUntil <DateTime> [-Comment <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByValueMandatory
Suspend-CMAlert -InputObject <IResultObject> -SkipUntil <DateTime> [-Comment <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Suspend-CMAlert cmdlet suspends monitoring of an alert until a specified date. At that time, Microsoft System Center 2012 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.

Parameters

-Comment<String>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Id<String>

Specifies an alert identifier. You can obtain the identifier of an alert by using the Get-Alert cmdlet.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<IResultObject>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SkipUntil<DateTime>

Starts evaluation of an alert at the specific date and time. Enter a DateTime object, such as one that the Get-Date cmdlet returns, 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".

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

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    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Suspend an alert by using ID

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

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

Example 2: Suspend an alert by using alert object variable

This example suspends monitoring of an alert until a specified date.

The first command gets the alert object that has the Id 16777221 and 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.

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"

Enable-CMAlert

Get-CMAlert

Remove-CMAlert

Set-CMAlert

Disable-CMAlert