Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HewlettPackard/POSH-HPEOneView/llms.txt

Use this file to discover all available pages before exploring further.

Synopsis

Update an HPE OneView alert’s assignment, notes, or active/cleared state.

Syntax

Default — update assignment or notes

Set-OVAlert
    -InputObject <Object>
    [-AssignToUser <String>]
    [-Notes <String>]
    [-ApplianceConnection <Object>]
    [<CommonParameters>]

Cleared — mark alert as cleared

Set-OVAlert
    -InputObject <Object>
    -Cleared
    [-ApplianceConnection <Object>]
    [<CommonParameters>]

Active — reactivate a cleared alert

Set-OVAlert
    -InputObject <Object>
    -Active
    [-ApplianceConnection <Object>]
    [<CommonParameters>]

Description

Set-OVAlert modifies an existing alert object returned by Get-OVAlert. You can:
  • Assign the alert to a specific user with -AssignToUser.
  • Add free-text notes with -Notes.
  • Mark the alert as cleared with -Cleared.
  • Reactivate a previously cleared alert with -Active.
If no -Notes value is supplied, the cmdlet automatically generates a note recording which parameters were changed. When a Locked alert state is changed with -Cleared or -Active, the request is sent with ?force=true to override the lock. The updated alert object is returned.
Clear-OVAlert is deprecated. Use Set-OVAlert -Cleared instead.

Parameters

InputObject
Object
required
The alert object to update. Must be an HPEOneView.Alert object (i.e., one returned by Get-OVAlert). Can be provided via the pipeline.Aliases: -alertUri, -Alert
AssignToUser
String
Username to assign the alert to. The user must exist on the appliance.
Notes
String
Free-text notes to attach to the alert. If omitted, the cmdlet generates an automatic note describing the change.
Cleared
SwitchParameter
Mark the alert state as Cleared. Mutually exclusive with -Active.
Active
SwitchParameter
Restore the alert state to Active. Mutually exclusive with -Cleared.
ApplianceConnection
Object
Specify one or more appliance connection objects or names. Defaults to the default connection in $ConnectedSessions.

Examples

Assign active interconnect alerts to a user

$alerts = Get-OVAlert -HealthCategory Logical-Interconnect -AlertState Active

foreach ($alert in $alerts)
{
    $updated = Set-OVAlert -InputObject $alert -AssignToUser Sally
    "Assigned to Sally: {0}" -f $updated.description | Write-Host
}

Clear a specific alert with a note

$alert = Get-OVAlert -AlertState Active | Where-Object description -match 'Fan failure'
Set-OVAlert -InputObject $alert -Cleared -Notes 'Fan replaced and verified operational.'

Clear all active alerts older than seven days

$alerts = Get-OVAlert -AlertState Active

foreach ($alert in $alerts)
{
    $created = Get-Date $alert.created
    if ((Get-Date) -gt $created.AddDays(7))
    {
        $updated = Set-OVAlert -InputObject $alert -Cleared
        "Cleared from {0}: {1}" -f $created, $updated.description | Write-Host
    }
}

Reassign an alert and add notes in one call

$alert = Get-OVAlert -AssignedToUser Bob -AlertState Active | Select-Object -First 1
Set-OVAlert -InputObject $alert -AssignToUser Alice -Notes 'Reassigned to Alice for investigation.'

Output

HPEOneView.Alert The updated alert object is returned. Key properties:
PropertyTypeDescription
alertStateStringNew state after the update
assignedToUserStringUser the alert is now assigned to
notesStringNotes attached to the alert
modifiedDateTimeTimestamp of the last modification

Build docs developers (and LLMs) love