Export (0) Print
Expand All
Expand Minimize

Set-CMAlert

Updated: September 1, 2013

Applies To: System Center 2012 Configuration Manager SP1

Set-CMAlert

Changes properties of Configuration Manager alerts.

Syntax

Parameter Set: SetById
Set-CMAlert -Id <String> [-Comments <String> ] [-NewName <String> ] [-ParameterValues <String> ] [-Severity <Severities> {Error | Informational | Warning} ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetByName
Set-CMAlert -Name <String> [-Comments <String> ] [-NewName <String> ] [-ParameterValues <String> ] [-Severity <Severities> {Error | Informational | Warning} ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetByValue
Set-CMAlert -InputObject <IResultObject> [-Comments <String> ] [-NewName <String> ] [-ParameterValues <String> ] [-Severity <Severities> {Error | Informational | Warning} ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Set-CMAlert cmdlet updates the properties of one or more Microsoft System Center 2012 Configuration Manager alerts.

Parameters

-Comments<String>

Specifies comments for an alert. These comments appear together with the alert in the Configuration Manager console.


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 an alert name. 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

-NewName<String>

Specifies a new name for the alert.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ParameterValues<String>

Specifies the values of administrator-defined parameters, such as thresholds.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Severity<Severities>

Specifies the severity of an alert. Valid values are:
-- 1: Error
-- 2: Warning
-- 3: Informational


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


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.

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: Set alert properties

This command changes the values of the Comments and Severity properties for an alert that has the ID 16777223.


PS C:\> Set-CMAlert -Id "16777223" -Comments "Editing severity" -Severity 2

Example 2: Set alert properties by using alert object variable

In this example, the first command gets an alert object that has the ID 16777221 and stores it in the $AlertObj variable.

The second command changes the Comments property of the alert stored in the $AlertObj variable.


PS C:\> $AlertObj = Get-CMAlert -Id "16777221"PS C:\> Set-CMAlert -InputObject $AlertObj -Comments "Updating alert"

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft