by alarm name.
i give it a next try on some dc's before i made it for the whole "farm".
change the last lines of the scripts to:
$alarmLength = 80
$to = Get-DataCenter | where {"testsystem","temp" -notcontains $_.Name}
$tgtAlarm = "test1", "test2", "test3"
$alarms = Get-AlarmDefinition -name $tgtAlarm
$alarms | % {
Move-Alarm -Alarm $_ -To $to -DeleteOriginal:$false
}
some new errors:
- somewhere alarm "test1" will rename to "test" but the description is "original name: test1"
- two errors in powercli that "test" already exist
- the copied alarms in root will be named in "alarm name (moved to dc1, dc2, dc3, dc4, dc5 ... )"; how to change your great script to rename the original name one time?