vSphere PowerCLI Reference

Set-AlarmDefinition

Synopsis

Modifies the specified alarm definitions.

Syntax

Set-AlarmDefinition [-AlarmDefinition] <AlarmDefinition[]> [-ActionRepeatMinutes <Int32>] [-Description <String>] [-Enabled [<Boolean>]] [-Name <String>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

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

Detailed Description

Modifies the specified alarm definitions.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
AlarmDefinitionAlarmDefinition[]Specify the alarm definition you want to modify.truetrue (ByValue)
ActionRepeatMinutesInt32Specify a time period in minutes to define how often the alarm action repeats if the alarm is active.falsefalse
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse
DescriptionStringSpecify a new description of the alarm definition.falsefalse
EnabledBooleanIndicate that the alarm definition is enabled.falsefalse
NameStringSpecify a new name of the alarm definition.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
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

AlarmDefinition

Notes

Examples

-------------- Example 1 --------------

Get-AlarmDefinition -Name 'alarms' | Set-AlarmDefinition -ActionRepeatMinutes ($_.ActionRepeatMinutes + 1)

Increase all selected alarms action repeat minutes.

-------------- Example 2 --------------

Get-AlarmDefinition -Name 'alarm' | foreach {$_ | Set-AlarmDefinition -Name 'alarm new name' -Description 'new description' -Enabled:$true}

Changes the name, description, and the Enabled flag of the selected alarms.


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