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!