Set-CMAlert

Set-CMAlert

Changes properties of Configuration Manager alerts.

構文

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>]

詳細説明

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

パラメーター

-Comments<String>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Id<String>

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

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-InputObject<IResultObject>

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

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Name<String>

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

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-NewName<String>

Specifies a new name for the alert.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ParameterValues<String>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Severity<Severities>

Specifies the severity of an alert. Valid values are:

-- 1: Error
-- 2: Warning
-- 3: Informational

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

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"

関連トピック

Enable-CMAlert

Get-CMAlert

Remove-CMAlert

Suspend-CMAlert

Disable-CMAlert