Resolve-SCOMAlert
解决警报。
语法
Resolve-SCOMAlert
-Alert <MonitoringAlert[]>
[-Connector <MonitoringConnector>]
[[-CustomField1] <String>]
[[-CustomField2] <String>]
[[-CustomField3] <String>]
[[-CustomField4] <String>]
[[-CustomField5] <String>]
[[-CustomField6] <String>]
[[-CustomField7] <String>]
[[-CustomField8] <String>]
[[-CustomField9] <String>]
[[-CustomField10] <String>]
[[-Owner] <String>]
[[-TicketId] <String>]
[-TfsWorkItemId <String>]
[-TfsWorkItemOwner <String>]
[[-Comment] <String>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
Resolve-SCOMAlert cmdlet 可解决 System Center - Operations Manager 中的警报。 cmdlet 将警报的 ResolutionState 属性设置为 255 (Closed) 。 还可以通过使用 Set-SCOMAlert cmdlet 并将 ResolutionState 参数设置为 255 (Closed) 来解决警报。
示例
示例 1:使用警报严重性解决错误警报
PS C:\>Get-SCOMAlert -Severity 2 | Resolve-SCOMAlert -Comment "All alerts are resolved."
此命令解决所有错误警报,并向已解决的警报添加注释。
参数
-Alert
指定 MonitoringAlert 对象的数组。 若要获取 MonitoringAlert 对象,请使用 Get-SCOMAlert cmdlet。
Type: | MonitoringAlert[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Comment
指定要添加到已解决警报的注释。
Type: | String |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
提示你在运行 cmdlet 之前进行确认。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Connector
指定 MonitoringConnector 对象。 此参数指定生成连接字符串的连接器。 若要获取 MonitoringConnector 对象,请使用 Get-SCOMConnector cmdlet。
Type: | MonitoringConnector |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomField1
指定要添加到警报的 CustomField1 属性的信息。
Type: | String |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomField10
指定要添加到警报的 CustomField10 属性的信息。
Type: | String |
Position: | 11 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomField2
指定要添加到警报的 CustomField2 属性的信息。
Type: | String |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomField3
指定要添加到警报的 CustomField3 属性的信息。
Type: | String |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomField4
指定要添加到警报的 CustomField4 属性的信息。
Type: | String |
Position: | 5 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomField5
指定要添加到警报的 CustomField5 属性的信息。
Type: | String |
Position: | 6 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomField6
指定要添加到警报的 CustomField6 属性的信息。
Type: | String |
Position: | 7 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomField7
指定要添加到警报的 CustomField7 属性的信息。
Type: | String |
Position: | 8 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomField8
指定要添加到警报的 CustomField8 属性的信息。
Type: | String |
Position: | 9 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomField9
指定要添加到警报的 CustomField9 属性的信息。
Type: | String |
Position: | 10 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Owner
指定警报所有者的用户名,格式为 Domain\Account。
Type: | String |
Position: | 13 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PassThru
指示 cmdlet 创建或修改命令可以在管道中使用的对象。 默认情况下,此 cmdlet 将不产生任何输出。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TfsWorkItemId
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TfsWorkItemOwner
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TicketId
指定警报的票证 ID。
Type: | String |
Position: | 14 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
显示运行该 cmdlet 时会发生什么情况。 此 cmdlet 未运行。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |