O'Reilly logo

Mastering PowerCLI by Sajal Debnath

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing alarms

To manage the different aspects of an alarm, we can use the following cmdlets:

  • Get-AlarmAction
  • New-AlarmAction
  • Remove-AlarmAction
  • Get-AlarmDefinition
  • Set-AlarmDefinition
  • Get-AlarmActionTrigger
  • New-AlarmActionTrigger
  • Remove-AlarmActionTrigger

There is no direct cmdlet available to create an alarm. We can create an alarm using the vSphere APIs, which we will cover in a later chapter. So, in this section, we will cover how to define and manage the different aspects of an existing alarm.

An alarm has main three parts: an alarm definition, alarm action, and alarm action trigger.

In the following screenshot, the definition is where you will define the name, description, type, and whether it is enabled or not:

We can use the Get-AlarmDefinition

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required