Created
May 29, 2023 16:22
-
-
Save JeremyTBradshaw/c7761f946c41db027dc679c150a5654f to your computer and use it in GitHub Desktop.
Get Exchange Back Pressure Status and Thresholds Summary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Longer version: https://github.com/JeremyTBradshaw/PowerShell/blob/main/Get-BackPressureStatus.ps1 | |
# Reference: https://learn.microsoft.com/en-us/exchange/mail-flow/back-pressure#view-back-pressure-resource-thresholds-and-utilization-levels | |
$TransportServers = Get-TransportService | |
$backPressureDiagInfo = foreach ($srv in $TransportServers) { | |
[xml]$perServerBPDiagInfo = Get-ExchangeDiagnosticInfo -Server $srv.Name -Process EdgeTransport -Component ResourceThrottling | |
foreach ($rsrc in $perServerBPDiagInfo.Diagnostics.Components.ResourceThrottling.ResourceTracker.ResourceMeter) { | |
$rsrc | Select-Object @{Name = 'Server'; Expression = { $srv.Name } }, | |
@{Name = 'Resource'; Expression = { $_.Resource -replace '\[.*' } }, | |
CurrentResourceUse, | |
PreviousResourceUse, | |
Pressure, | |
@{ | |
Name = 'PressureTransitions' | |
Expression = { $_.PressureTransitions -replace '(Pressure.*\:\s)|(ow)|(edium)|(igh)' -replace '(To)', '>' } | |
} | |
} | |
} | |
# What to do with $backPressureDiagInfo? Here are some ideas: | |
$backPressureDiagInfo | Format-Table -GroupBy Server | |
$backPressureDiagInfo | Export-Csv -Path $Home\Downloads\BackPressureStatus.csv -NTI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment