Formatting Get-ExchangeDiagnosticInfo


For the last blog post for today, this one looks at formatting the output of Get-ExchangeDiagnosticInfo as the XML that this cmdlet returns can be quite long. For example if you want to see if your server is in backpressure then you need to view the output of the ResourceMonitor component, but as this contains historical information on backpressure events its more than enough data to overfill the Exchange Management Shell screen!

So rather than running Get-ExchangeDiagnosticInfo -Process EdgeTransport -Component ResourceManager -Argument verbose you can do the following

$diag = Get-ExchangeDiagnosticInfo –Server xxx –Process EdgeTransport –Component ResourceManager –Argument verbose
$diag.Diagnostics.Components.ResourceManager.CurrentComponentStates
$diag.Diagnostics.Components.ResourceManager.ResourceMonitors.ResourceMonitor | FT –a Type, Resourc*,*Pressure*

This will collect the ResourceManager component from Get-ExchangeDiagnostics and place it in a variable called $diag. The second line returns the state of each backpressure monitor and if it is enabled and the third line displays the results of backpressure on your server (currentpressure) along with the values at which you will change from low to medium (the mediumPressureLimit) or from medium to high (the highPressureLimit) or from medium to low (the lowPressureLimit). For an example see the below picture, from my lab environment, which is currently busy doing nothing!

image


Posted

in

, , , , ,

by

Tags:

Comments

6 responses to “Formatting Get-ExchangeDiagnosticInfo”

  1. […] The CmdLet Get-ExchangeDiagnosticInfo is not very well documented, but very useful if you want to see your server’s health state. Brian Reid already posted more details and how to format the output. You can find his post here. […]

  2. Jide avatar
    Jide

    I tried this but it returned nothing. does it work on exchange 2013 server?

    1. Brian Reid avatar

      Yes, it works on all versions of Exchange Server since 2010

    2. Jan avatar
      Jan

      Me too.
      Output of Get-ExchangeDiagnosticInfo is … nothing/emty.
      But inside EdgeTransport.exe.config „EnableResourceMonitoring“ is set “true”.
      Any ideas?
      Thanks
      Jan

      1. Brian Reid avatar

        Where the script says “-Server XXX” you are entering the correct server name?

Leave a Reply

Your email address will not be published. Required fields are marked *

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