auris - Fotolia

Manage Learn to apply best practices and optimize your operations.

Uncover Exchange back pressure triggers with PowerShell

Email not being delivered? Administrators can run PowerShell commands to pinpoint outages and performance degradation during periods of heavy activity.

When Exchange Server experiences too much load and doesn't have the resources to perform its services, a transport...

server's back pressure mechanism engages to prevent server failure.

The Exchange back pressure feature throttles or halts mail flow to keep Exchange Server functioning. Exchange Server administrators must monitor the infrastructure to determine how much pressure servers are under and avoid error messages or a halt in mail delivery.

Admins can use PowerShell to retrieve diagnostic information from Exchange Server.

To view the resource-throttling information for the Edge Transport process on a server named MBX1, enter this PowerShell command into the Exchange Management Shell:

Get-ExchangeDiagnosticInfo -Server MBX1 -Process EdgeTransport -Component ResourceThrottling

Resource throttling information
Figure 1. Administrators can use the Get-ExchangeDiagnosticInfo cmdlet to display the resource throttling information from the Exchange Server.

The results (Figure 1) are presented in XML format instead of the standard PowerShell output, which prevents the use of the Select-Object cmdlet to view the individual values. But we can tell the Exchange Management Shell to display a specific piece of XML data.

To do this, administrators must to know that XML tags are hierarchical. The third line in Figure 1 has a tag named ID. To display the ID value -- in this example, 6340 -- refer to the other tags in the hierarchy. The top level tag is Diagnostics, the second level tag is ProcessInfo and the third level tag is ID. So we would reference Diagnostics.ProcessInfo.ID, rather than call ID directly.

The easiest way to do this is to assign the Get-ExchangeDiagnosticInfo command to an XML variable. This assignment works the same way as with any other PowerShell variable, except [xml] must be specified before the variable name to pull data from the variable.

To see this in action, determine the current working set size. The first step is to declare a variable with this command:

[xml]$BP = Get-ExchangeDiagnosticInfo -Server MBX1 -Process EdgeTransport -Component ResourceThrottling

Then retrieve the working set size by referencing the variable and the required tags. In this case, the command is:


In Figure 2, the working set is reported as 187.1 MB.

Working set
Figure 2. Use the all the XML tags in the hierarchy to show the size of the working set.

Figure 2 also shows a few empty returns and then the command $BP.WorkingSet, which offers no output. This shows why administrators must specify all XML tags in the hierarchy to display the requested data. If you expect to see results but do not get an output, check to see if you omitted or misspelled a tag.

Understanding Exchange back pressure information

Figures 1 and 2 show limited information because the commands were run on a mailbox server -- not an edge transport server -- to build familiarity with XML. Running commands on an edge server delivers more details.

Type the Get-ExchangeDiagnosticInfo command, but use the edger server name. This will yield a different output. Figure 3 shows truncated results from this command:

Get-ExchangeDiagnosticInfo -Server E2K16Edge -Process EdgeTransport -Component ResourceThrottling

Get-ExchangeDiagnosticInfo command
Figure 3. The Get-ExchangeDiagnosticInfo command results are truncated.

To see the full set, append the Select-Object cmdlet, along with the -ExpandProperty parameter, followed by the word Result. The full command is:

Get-ExchangeDiagnosticInfo -Server <server name> -Process EdgeTransport -Component ResourceThrottling | Select-Object -ExpandProperty Result

Figure 4 shows a small portion of the output.

Resource throttling data
Figure 4. Exchange generates a lot of resource throttling data in XML format.

The XML data lists a number of different Exchange Server resources. For each resource, Exchange lists the pressure and the pressure transitions. It also lists the current and previous resource use. For example, Figure 5 shows resource meter data that's related to DatabaseUsedSpace and indicates that the resource is currently at low pressure and had been under low pressure before. The current pressure reading is 4.

XML data
Figure 5. The XML data shows the pressure and pressure transitions for different Exchange Server resources.

Admins can use the Exchange Management Shell to monitor pressure and pressure changes on edge transport servers. Microsoft provides an explanation of various Exchange back pressure metrics online.

Next Steps

Use logs to detect server pressure, analysis

Virtualization considerations for Exchange 2016

Use PowerShell commands for faster Exchange mailbox management

Dig Deeper on Exchange Server setup and troubleshooting