PowerCLI – Remove SNMP Traps from vCenter Alarms
# https://vmscribble.com/powercli/powercli-remove-snmp-traps-from-vcenter-alarms/
# Tested on vCSA 6.7
Write-Host " The PowerCLI script will remove sending of SNMP traps from all Alarms in the vCenter"
$vCenter = Read-Host "Enter the vCenter Name"
# Connect to your vCenter
Connect-VIServer $vCenter
# Remove the SNMP trap action
$TheAction = Get-AlarmAction -actiontype sendsnmp
Remove-AlarmAction -alarmaction $TheAction -Confirm:$false
# Disconnect from the vCenter
Disconnect-VIServer $vCenter -Confirm:$false