vSphere PowerCLI Reference

Get-AlarmDefinition

Synopsis

Retrieves the available alarm definitions.

Syntax

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

Related Commands

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

Detailed Description

Retrieves the available alarm definitions.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameString[]Specify the names of the alarms you want to retrieve.falsefalse
EntityVIObject[]Filter the alarm definitions by the entities to which they are defined. The parameter accepts InventoryItem and Datastore objects.falsetrue (ByValue)
EnabledBooleanIndicate that you want to retrieve only the enabled alarm definitions.falsefalse
IdString[]Specify the Ids of the alarms you want to retrieve.falsefalse
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given 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

AlarmDefinition

Notes

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.


Copyright © 1998 - 2011 VMware, Inc. All rights reserved.