Exchange server maintenance requires some specific steps in 2013+. There is no specific maintenance mode, as in previous versions, but you can complete a few actions to take a server out of production. You will need to drain the SMTP queues on the server, tag the services as unavailable, then disable transport entirely. Each step needs to have some rest time, so that is built into the script.
Download it here: Microsoft Technet Gallery.