Event 7031 when you run Exchange maintenance scripts or Set-ServerComponentState

Applies to: Exchange Server 2013 Standard EditionExchange Server 2013 EnterpriseExchange Server 2016 Standard Edition


The Frontend Transport service crashes when you do one of the following things:

This problem occurs in the following products:

  • Microsoft Exchange Server 2016
  • Exchange Server 2013 with cumulative update (CU) 6 or a later CU

When the problem occurs, event 7031 is logged:

Log Name: System
Source: Service Control Manager
The Microsoft Exchange Frontend Transport service terminated unexpectedly. It has done this 1 time(s). The following corrective action will be taken in 5000 milliseconds: Restart the service.

Examples of Set-ServerComponentState that terminate the Frontend Transport service

  • Set-ServerComponentState -Identity <ServerName> -Component ServerWideOffline -State Inactive -Requester Maintenance
  • Set-ServerComponentState -Identity <ServerName> -Component ServerWideOffline -State Active -Requester Maintenance
  • Set-ServerComponentState -Identity <ServerName> -Component ServerWideOffline -State Inactive -Requester Functional

The first two commands are included in the Exchange 2013 DAG Maintenance scripts. Therefore, you encounter this problem when you run the scripts.


This issue is by design, due to code changes in Exchange Server 2016 and Exchange Server 2013 starting with CU6.