Zachary Loeber

The personal website of Zachary Loeber.

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:


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.


comments powered by Disqus