PowerCLI Reference

Get-AlarmDefinition

Synopsis

This cmdlet retrieves the available alarm definitions.

Syntax

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

Related Commands

Online Version
Get-AlarmAction
Get-AlarmActionTrigger
New-AlarmAction
New-AlarmActionTrigger
Remove-AlarmAction
Remove-AlarmActionTrigger
Set-AlarmDefinition
New-AlarmActionTrigger

Detailed Description

This cmdlet retrieves the available alarm definitions.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameString[]Specifies the names of the alarms you want to retrieve.falseFalse
EntityVIObject[]Filters the alarm definitions by the entities to which they are defined. This parameter accepts InventoryItem, Datastore, and DatastoreCluster objects.falseTrue (ByValue)
EnabledBooleanIndicates that you want to retrieve only the enabled alarm definitions.falseFalse
IdString[]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.
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 AlarmDefinition objects

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 © VMware, Inc. All rights reserved.