Get-AlarmDefinition Command | Vmware PowerCLI Reference

Get-AlarmDefinition

This cmdlet retrieves the available alarm definitions.

Syntax

Get-AlarmDefinition
[ [-Entity ] < VIObject[] > ]
[-Enabled < Boolean > ]
[-Id < String[] > ]
[-Name < String[] > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional Entity VIObject[] 1
  • pipeline
Filters the alarm definitions by the entities to which they are defined. This parameter accepts InventoryItem, Datastore, and DatastoreCluster objects.
optional Enabled Boolean named
Indicates that you want to retrieve only the enabled alarm definitions.
optional Id String[] named
  • wildcards
Specifies the IDs of the alarms you want to retrieve. Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list.
optional Name String[] named
  • wildcards
Specifies the names of the alarms you want to retrieve.
optional Server VIServer[] named
  • wildcards
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.AlarmDefinition

Examples

Example 1

Get-AlarmDefinition -Entity (Get-Folder -NoRecursion) -Name "Host connection and power state" -Enabled:$true

Retrieve the enabled alarms named "Host connection and power state" for the available folders.

Example 2

Get-AlarmDefinition -Server Server1, Server2

Retrieves the alarms for the specified servers.

Related Commands

AlarmAction

This cmdlet retrieves the actions of the specified alarm definitions.

This cmdlet creates an alarm action and attaches it to the specified alarm.

This cmdlet removes an alarm action.

AlarmActionTrigger

This cmdlet retrieves the actions that trigger the specified alarm actions.

This cmdlet creates a new action trigger for the specified alarm action.

This cmdlet removes the alarm action triggers.

AlarmDefinition

This cmdlet retrieves the available alarm definitions.

This cmdlet creates a new alarm definition.

This cmdlet removes alarm definitions from the vSphere environment.

This cmdlet modifies the specified alarm definitions.

AlarmTrigger

This cmdlet retrieves alarms triggers.

This cmdlet adds ? new alarm trigger to the existing alarm or creates ? new alarm trigger.