It’s a problem that every admin has to face at some point or another: you have a series of servers that you need to shutdown or reboot. If you’re doing this with relatively recent versions of Windows, no problem — just use the handy shutdown command-line tool. Combined with a list of server names, you’re good to go.
Oh, wait…not so fast. You need to make sure the SQL server doesn’t shut down until the SharePoint server has shutdown first. Likewise, if you shut the domain controllers down, your Exchange servers are going to do a 10-minute timeout waiting for AD calls to complete. What you really need is a way to sequence your shutdowns, and that gets messy quickly. Sequenced shutdowns are most common for patch management and UPS power situations, but there are many circumstances in which you need to sequence a subset of your machines. Clusters, anyone? (You are using UPSs on all of your servers, right? Even if you get the high-end UPSes that send out network notifications to all of your servers, you still need these servers to be able to shutdown in an orderly fashion.)
The Windows IT Pro online newsletter has an article by Dick Lewis that explores the topic of Scripting Sequenced Shutdowns. Right now it’s available to view even if you’re not a subscriber, so go see what he has to say and download the sample code.