I’ve recently been exploring the challenge of detecting back pressure on Hub Transport servers without the assistance of any monitoring system in an Exchange Server environment.
Because back pressure is reported by a Transport server in the Application event log it is possible to automate checking for the events using PowerShell.
The objective is to make it possible to check Hub Transport servers reasonably quickly for their current state to discover whether the back pressure events are occurring.
I’ve written a basic script to perform this check, which I’ll share here in its current form.
Download Test-TransportServerBackPressure.ps1 from Github.
Running the Script
This script has the following dependencies:
- PowerShell 2.0 on the server running the script
- Exchange 2010 (or later) Management Tools on the server running the script
- PS Remoting enabled on the Hub Transport servers being checked (will error if not)
- You may need to modify your PowerShell execution policy to run this script file
When running the script please also be aware that:
- If your servers have no back pressure issues at all then the results won’t be very interesting 🙂
- If your servers experienced a back pressure condition and you cycled the Transport service as part of your corrective action then the last event log entry may not reflect the true current state of the server
Checking a single Hub Transport server:
PS C:Scripts> .Test-TransportServerBackPressure.ps1 ho-ex2010-mb1 HO-EX2010-MB1 has no back pressure events found.
Checking all Hub Transport servers:
PS C:Scripts> .Test-TransportServerBackPressure.ps1 HO-EX2010-MB1 has no back pressure events found. HO-EX2010-MB2 is Critical (Diskspace) as of 44 hours ago BR-EX2010-MB has no back pressure events found. HO-EX2007-MB1 is Critical (Diskspace) as of 44 hours ago
Download Test-TransportServerBackPressure.ps1 from Github.
If you are experiencing back pressure issues on your Hub Transport servers please read this guide to back pressure in Exchange Server.
Hi Paul, I just discovered your script after having a back pressure issue (first time so quite a new discovery for me). After I fixed the issue I went in search of a way to get proactive notifications and found your script. Many thanks!
I leave a comment when I especially enjoy a article on a site or I have something to valuable to contribute to the discussion. Usually it is
a result of the passion displayed in the article I
browsed. And on this article PowerShell Script: Check Hub Transport Servers for Back Pressure.
I was actually moved enough to leave a thought π I actually do have 2 questions for you if it’s okay.
Is it just me or does it appear like a few of these comments come
across as if they are left by brain dead people?
π And, if you are writing on additional sites, I’d like
to follow you. Would you make a list all of all your public sites like your Facebook page, twitter feed, or
linkedin profile?
Hello to every body, it’s my first pay a visit of this blog; this website consists of remarkable and really excellent data for visitors.
Pingback: read this post from ask.fm
Hmh, seems like the script doesn’t properly detect cleared problem after reboot. Obviously Exchange doesn’t bother logging a recovery event if it’s rebooted, and that usually fixes the problem.
Anyone has an idea how to properly take that into account? Not returning error state if time since last error is more than time since last reboot?
Does this still work in 2016? I am getting the following error:
Invoke-Command : One or more computer names are not valid. If you are trying to pass a URI, use the -ConnectionUr
parameter, or pass URI objects instead of strings.
At D:scriptsExchangeBackpressureCheck.ps1:78 char:14
+ $events = @(Invoke-Command Γ’?”Computername $server Γ’?”ScriptBlock { Get-EventLo …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (System.String[]:String[]) [Invoke-Command], ArgumentException
+ FullyQualifiedErrorId : PSSessionInvalidComputerName,Microsoft.PowerShell.Commands.InvokeCommandCommand
The Real Person!
The Real Person!
Those Γ’? characters shouldn’t be there. You sure you downloaded the script correctly?
Same issue here. I opened it in VS Code, and did a find and replace on the hyphen. It was probably some other character set, and in my English version of Windows 10 Education didn’t work properly. After the find/replace on the hyphen, the script runs.
Thanks Paul Cunningham
Shell works so well
Thanks a lot
Grettings
Luis Reyes
the link to download is not working am getting error Not found, error 404,
can you please assist please.
warm regards
Kamal
The Real Person!
The Real Person!
Sorry, the download system failed again. I’ve moved this script to Github now instead. Here it is:
https://github.com/cunninghamp/Powershell-Exchange/tree/master/BackPressure
Hi, I tried to download the PS1 script but it takes me to a screen with the following and there is no way to download the script. Please help…
Download the Exchange Server 2010 to 2013 Migration Guide
Thanks for subscribing to Exchange Server Pro. Here is your free download.
Download Ebook
Watch your inbox for more Exchange Server deployment, migration and administration tips.
In the meantime, why not Follow @ExchServPro on Twitter, or Like Exchange Server Pro on Facebook.
The Real Person!
The Real Person!
Thanks for letting me know. The download manager plugin broke again π
I’ve fixed it now so the link will work if you try again.
Servers need to have WinRM enabled for Remote Management for this to work. Run the following from an elevated powershell window:
Enable-PSRemoting -Force
Which you already stated – I need to learn how to read π
Thanks anyway π
Pingback: Back Pressure in Microsoft Exchange Server