Exchange Log Level GUI Script

I ran into a situation recently where I was forced to amp up the Exchange logging levels to further troubleshoot an issue with some pretty specific Exchange components. I found myself wanting a quick GUI to view and set the levels but found none. So I used this as an opportunity to learn a bit about xaml based GUIs and powershell. The result is this simple, but useful, Exchange log level GUI script which was written for Exchange 2013 but should also run on 2010.

Here is an example of the script running on an Exchange 2013 server:

ExchangeLogLevelGUI

If you are trying to run this on Exchange 2010 you may need to run it from an administrative powershell.exe console started in STA mode. If you are already in your administrative exchange management shell then just run ‘powershell.exe -noprofile -STA’ then run this script with the -Exchange2010Mode parameter.

In the script I use an array of psobjects as the datasource for a basic listview with some predefined column bindings. One of the psobject properties is an array of strings containing the valid exchange logging level values for the combobox selectors. I use another psobject property to bind to the combobox initial value property. Interestingly enough, because some of the default log level values are set to non-standard values on 2013 (typically the number 2) this will mean you will see some unset comboboxes. I didn’t need to troubleshoot these particular areas of exchange so I never changed the logging level for these particular components. I’m not certain why they are set this way by default but I’d probably not change them in production without the thumbs up from MS support though.

You can download the script at the technet gallery.

Cheers!

Comments (2)

  1. 3:19 AM, 07/29/2014Martin S  / Reply

    We are running a complete Exchange 2010 SP3 Ru5 environment. When I run this script I get an empty GUI. Any ideas?? Thanks, Martin

    • 11:38 AM, 07/29/2014Zachary Loeber  / Reply

      I implemented a minor fix on the way I gathered exchange names to populate the drop down with. Try the most recent download of the script. It should fix the issue for ya.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Follow

Get every new post delivered to your Inbox

Join other followers