How can I automatically shut down the Exchange services on a server before I perform a backup?
First, whenever possible, you should be performing online backups (while the Exchange services are running), not offline backups (when the services are stopped). Exchange-aware backup products such as VERITAS Software's BackupExec or NT Backup can back up the Information Store (IS) databases and transaction logs, committing transactions as they go, without interrupting service to users. Therefore, you can perform a backup anytime you like because users can still get their mail.
To shut down all the Exchange services, you can just shut down the System Attendant (MSExchangeSA); this action forces all the other services to shut down cleanly. You can also use Kenneth Cornetet's Perl scripts to shut down whatever services are running, then restore them after you're finished performing your maintenance. The scripts are available from the Goodies & Links link at http://www.robichaux.net/writing/man-exchange.html.