ExBPA Useful View for PowerShell Script

I was wanting to get a list of the Exchange BPA alerts to the Exchange team doing 2007. I did not like the idea of copying and pasting lots of individual alerts. I knew that with a PowerShell get-alert I could export a list of alerts to Excel but how to get only the ExBAP ones. I knew there was an alert view for ExBPA alerts in the Exchange 2007 MP views and when I looked at the properties it was a Eureka moment.

As you can see these rules all use Custom Field 6 which makes it easy to do a PowerShell one liner. That is a good piece of forward thinking by the team that created these rules.

get-alert | where-object {($_.ResolutionState -ne 255) -and ($_.CustomField6 -eq “MSExchange ExBPA”)} | export-csv c:\ExBPA.csv

Although I found that when looking at the spreadsheet most of the columns were irrelevant so I just amended the PowerShell to do the three fields that I wanted.

get-alert | where-object {($_.ResolutionState -ne 255) -and ($_.CustomField6 -eq “MSExchange ExBPA”)} | select-object Name, NetbiosComputerName, Description | export-csv c:\ExBPA.csv

And then I had a nice little spreadsheet to send to the guys so they could have a quick look at what was alerting. I must teach them how to use the console.



  1. Brad Little

    When I run:

    get-alert | where-object {($_.ResolutionState -ne 255) -and ($_.CustomField6 -eq “MSExchange ExBPA”)} | export-csv c:\ExBPA.csv

    I get:

    The term ‘get-alert’ is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.
    At line:1 char:10

    Any ideas?

    Thanks in advance!!!


  2. Hi Brad, I realise I’m writing this response more than a year after you asked the question – but I thought I would answer it anyway just incase someone else comes across this post.

    The reason you’re getting that error is because you are running the command from the native powershell prompt, and not from the Operations Manager shell.

    You must run the “get-alert” command from the Operations Manager Command Shell which has extra cmdlets and utilities loaded. You can get to it from Start -> Programs -> System Center Operations Manager 2007 -> Command Shell.


%d bloggers like this: