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

Original KB number:  4043629


The Microsoft Exchange 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.

Set-ServerComponentState examples that end 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. So you meet this problem when you run the scripts.


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