PowerCLI Reference

Get-AlarmAction

Synopsis

This cmdlet retrieves the actions of the specified alarm definitions.

Syntax

Get-AlarmAction [[-AlarmDefinition] <AlarmDefinition[]>] [-ActionType <ActionType[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-AlarmActionTrigger
Get-AlarmDefinition
New-AlarmAction
New-AlarmActionTrigger
Remove-AlarmAction

Detailed Description

This cmdlet retrieves the actions of the specified alarm definitions.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
AlarmDefinitionAlarmDefinition[]Specifies the alarm definitions for which you want to retrieve the configured actions.falsetrue (ByValue)
ActionTypeActionType[]Specifies the type of the alarm actions you want to retrieve. The valid values are SendEmail, ExecuteScript, and Send SNMP.falsefalse
ServerVIServer[]Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse

Return Type

Zero or more AlarmAction objects

Notes

Examples

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

Get-AlarmDefinition -Name "Host processor status" | Get-AlarmAction -ActionType "ExecuteScript", "SendSNMP", "SendEmail"

Extract all PowerCLI supported alarm actions for the default alarm "Host processor status".

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

Get-AlarmAction -AlarmDefinition "Host processor status" -ActionType "SendSNMP" -Server 'server IP'

Extract the alarm actions for the default alarm "Host processor status" by specifying the alarm by name.


Copyright © VMware, Inc. All rights reserved.