Microsoft Knowledge Base Article 324268 contains the following summary:

This article describes general procedures that you can use to troubleshoot shutdown problems in Windows Server 2003.

When Windows shuts down, messages are sent to the devices, system services, and programs that are installed on the computer. These messages announce that Windows is preparing to shut down. The operating system waits for responses from programs that are running to make sure that the programs save unsaved data to the hard disk and shut down correctly. Each device, service, and program that is running typically responds to the shutdown message with a message that states that the program can be closed.

You may experience one or more of the following symptoms when you try to turn off the computer:

• The computer stops responding (hangs). When this symptom occurs, a black screen may be displayed.
• The computer does not turn off when you receive the message that states that it is safe to turn off your computer.  
• You receive an error message.
Typical causes of shutdown problems include the following:
• Faulty or incompatible device drivers.
• System services that either do not respond correctly or send busy request messages to the system.
• Faulty or incompatible programs.