powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Set-AlarmDefinition



NAME
Set-AlarmDefinition

SYNOPSIS
Modifies the specified alarm definitions.

SYNTAX
Set-AlarmDefinition [-AlarmDefinition] [-ActionRepeatMinutes ] [-Description ] [
-Enabled []] [-Name ] [-Server ] [-WhatIf] [-Confirm] []


DESCRIPTION
Modifies the specified alarm definitions.


PARAMETERS
-AlarmDefinition
Specify the alarm definition you want to modify.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-ActionRepeatMinutes
Specify a time period in minutes to define how often the alarm action repeats if the alarm is active.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Description
Specify a new description of the alarm definition.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Enabled []
Indicate that the alarm definition is enabled.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Name
Specify a new name of the alarm definition.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Server
Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the co
mmand runs on the default servers. For more information about default servers, see the description of Connect-V
IServer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm
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.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
AlarmDefinition


NOTES




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

C:\PS>Get-AlarmDefinition -Name 'alarms' | Set-AlarmDefinition -ActionRepeatMinutes ($_.ActionRepeatMinutes + 1)


Increase all selected alarms action repeat minutes.





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

C:\PS>Get-AlarmDefinition -Name 'alarm' | foreach {$_ | Set-AlarmDefinition -Name 'alarm new name' -Description 'ne
w description' -Enabled:$true}


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






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Set-AlarmDefinition.html
Get-AlarmDefinition
Get-AlarmAction
Get-AlarmActionTrigger
New-AlarmAction
New-AlarmActionTrigger
Remove-AlarmAction
Remove-AlarmActionTrigger