Wednesday, May 27, 2009

Scheduled Windows Server Restart Fails Intermittently

Symptom Brief Description:
Scheduled restarts of Windows Server 2003 fail intermittently when using shutdown.exe.
Problem:
A scheduled restart of a Windows 2003 server fails when using shutdown.exe.
Symptom:
Running shutdown.exe from a scheduled job or within a command prompt from a remote administration terminal services session fails with an error:
The computer is processing another action and thus cannot be shut down. Wait until the computer has finished its action, and then try again.(21)
An entry in the Scheduled Task log states
Result: The task completed with an exit code of (15).

Running shutdown.exe from the console or from a remote administration terminal services session connected to the console using the ‘/admin’ switch succeeds.
Solution:
Use the native tsshutdn.exe command instead of shutdown.exe. The tool is designed for application terminal servers, but the remote administration feature also uses terminal services. Tsshutdn will clear hung actions and successfully shutdown the server.

No comments:

Post a Comment