## PowerCLI Reference

# Set-AlarmDefinition

## Synopsis

This cmdlet 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

This cmdlet modifies the specified alarm definitions.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
AlarmDefinition | AlarmDefinition[] | Specifies the alarm definition you want to modify. | true | true (ByValue)
ActionRepeatMinutes | Int32 | Specifies a time period in minutes to define how often the alarm action repeats if the alarm is active. | false | false
Confirm | SwitchParameter | If 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. | false | false
Description | String | Specifies a new description for the alarm definition. | false | false
Enabled | Boolean | Indicates that the alarm definition is enabled. | false | false
Name | String | Specifies a new name for the alarm definition. | false | false
Server | VIServer[] | Specifies the vCenter Server systems 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. | false | false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

Return Type

Zero or more modified AlarmDefinition objects

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