Skip to content

Instantly share code, notes, and snippets.

@JeremyTBradshaw
Created May 29, 2023 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeremyTBradshaw/c7761f946c41db027dc679c150a5654f to your computer and use it in GitHub Desktop.
Save JeremyTBradshaw/c7761f946c41db027dc679c150a5654f to your computer and use it in GitHub Desktop.
Get Exchange Back Pressure Status and Thresholds Summary.
# 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