Syntax
Set-OMAlert [-Alert] <OMAlert[]> -Cancel [-Server <OMServer[]>] [-Confirm] [-WhatIf] [<CommonParameters>]Related Commands
Online VersionDetailed 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 | |
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 objectsNotes
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.