## PowerCLI Reference

# Set-OMAlert

## Synopsis

This cmdlet configures vRealize Operations Manager alerts.

Syntax

Set-OMAlert -TakeOwnership [-Alert] <OMAlert[]> [-Server <OMServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-OMAlert -ReleaseOwnership [-Alert] <OMAlert[]> [-Server <OMServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-OMAlert -SuspendMinutes <Int32> [-Alert] <OMAlert[]> [-Server <OMServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-OMAlert -Cancel [-Alert] <OMAlert[]> [-Server <OMServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-OMAlert

Detailed Description

This cmdlet configures vRealize Operations Manager alerts.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Alert | OMAlert[] | Specifies the alert you want to configure. | true | true (ByValue)
Cancel | SwitchParameter | Cancels the alert and changes the alert status from active to inactive. | true | false
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false
InformationAction | ActionPreference |  | false | false
InformationVariable | String |  | false | false
PipelineVariable | String |  | false | false
ReleaseOwnership | SwitchParameter | Removes alert ownership from the assigned user. | true | false
Server | OMServer[] | Specifies the vRealize Operations Manager server from which you want to retrieve alerts. The value can be the connection object returned by the Connect-OMServer cmdlet or the object's name, which can be the IP or DNS address of the server machine. | false | false
SuspendMinutes | Int32 | Specifies the number of minutes for which the alert is suspended. | true | false
TakeOwnership | SwitchParameter | Assigns the alert ownership to the currently connected user. | true | false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

Return Type

The modified OMAlert objects

Notes

Examples

-------------- Example 1 --------------

    $alert = Get-OMAlert -Id 'ID'
    Set-OMAlert -Alert $alert -Cancel

Cancels the $alert alert.

-------------- Example 2 --------------

    Set-OMAlert -Alert 'alert_name' -Server 'server_name' -TakeOwnership

Takes ownership for all alerts, filtered by alert name and server.

-------------- Example 3 --------------

    $alert = Get-OMAlert -Id 'ID'
    Set-OMAlert -Alert $alert -SuspendMinutes 1

Suspends the $alert alert for one minute.

Copyright © VMware, Inc. All rights reserved.