Get-AlarmAction
This cmdlet retrieves the actions of the specified alarm definitions.
Syntax
[-ActionType
<ActionType[]>]
[-AlarmDefinition <AlarmDefinition[]>]
[-Server <VIServer[]>]
[CommonParameters]
[-AlarmDefinition <AlarmDefinition[]>]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
optional |
|
ActionType[] | named |
|
Specifies the type of the alarm actions you want to retrieve. The valid values are SendEmail, ExecuteScript, and Send SNMP. | optional |
|
AlarmDefinition[] | named |
|
Specifies the alarm definitions for which you want to retrieve the configured actions. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null 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. |
Output
VMware.VimAutomation.ViCore.Types.V1.Alarm.AlarmAction
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.
Related Commands
AlarmAction
This cmdlet retrieves the actions of the specified alarm definitions.
This cmdlet removes an alarm action.
This cmdlet creates an alarm action and attaches it to the specified alarm.
AlarmActionTrigger
This cmdlet retrieves the actions that trigger the specified alarm actions.
This cmdlet removes the alarm action triggers.
This cmdlet creates a new action trigger for the specified alarm action.
AlarmDefinition
This cmdlet retrieves the available alarm definitions.
This cmdlet modifies the specified alarm definitions.
This cmdlet removes alarm definitions from the vSphere environment.
This cmdlet creates a new alarm definition.
AlarmTrigger
This cmdlet retrieves alarms triggers.
This cmdlet adds ? new alarm trigger to the existing alarm or creates ? new alarm trigger.