Syntax
Get-AlarmAction [[-AlarmDefinition] <AlarmDefinition[]>] [-ActionType <ActionType[]>] [-Server <VIServer[]>] [<CommonParameters>]Related Commands
Online versionDetailed Description
This cmdlet retrieves the actions of the specified alarm definitions.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
AlarmDefinition | AlarmDefinition[] | Specifies the alarm definitions for which you want to retrieve the configured actions. | false | true (ByValue) | |
ActionType | ActionType[] | Specifies the type of the alarm actions you want to retrieve. The valid values are SendEmail, ExecuteScript, and Send SNMP. | false | false | |
Server | VIServer[] | 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. | false | false |
Return Type
Zero or more AlarmAction objectsNotes
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.