I'm all for writing scripts, but this is something Oncommand should be doing.
Remember, you are never going to compete with developers especially with a program like oncommand..
But, if you insist, I will get you started
Put all the filers in a txt filer
$filers = gc c:\filers.txt
$filers | % {
$filer = $_
# Assuming you have RPC access to filer, if not you need to create credentials cache
$c = connect-nacontroller $filer
$disks = get-nadisk | ? {$_.status -eq "failed"}
# write to file
$disks | ? {$_.status -eq "failed"} | ft @{e={$Filer};l="filer";Width =10},@{e={$_.name};L="Disk Name";Width=10},@{E={$_.status};L="Status";Width=10} | out-file c:\filer.log -append
}
if (gc c:\filer.log -ne $Null) {
Send-MailMessage -To $recipients -From $sendMailAs -Subject $subjectLine -Body "Failed Disks attached" -Priority $priority -SmtpServer $smtpServer
}
# Please note, I wrote this really quick and dirty and I didn't even test it out.. I didn't have a failed disk to check to see if the status was failed or broken But it gives you different options on how to do things