Hi James,
Please try the following (assuming you are connected to vCenter server via PowerCLI):
$output = foreach ($alarm in Get-AlarmAction) { $alarm | Select-Object @{N="Alarm";E={$_.AlarmDefinition}}, @{N="Action Type";E={$_.ActionType}}, @{N="Trigger";E={[string]::Joi
n(",",($_.Trigger))}} }
$output | Export-CSV "C:\alarm.csv"
Modify the bold and italic to change the output path.
Sample Output:
"Alarm","Action Type","Trigger"
"Timed out starting Secondary VM","SendSNMP","Yellow -> Red (Repeat)"
"No compatible host for Secondary VM","SendSNMP","Yellow -> Red (Repeat)"
Hope this helps,
Steven.