Summary

Utilities that shutdown/restart remote computers (such as the shutdown program contained in the Windows NT resource kit or the free shutdown utility offered by Arcana Development) may fail when they are run under the Scheduler in an attempt to restart a remote computer.

For example, the shutdown utility contained in the Windows NT Resource Kit can be used to shut down a remote computer using the following syntax:

shutdown \\remotecomputername

When run under the Scheduler, the command may fail with the following error message:

AdjustTokenPriviledges Enable Failed

The command will fail with this error if it is run under the Local System account, or if the user whose account the program is scheduled under is logged in at the time the command is executed.

For example, the Scheduler on ComputerA is running the shutdown command to restart ComputerB ("shutdown \\ComputerB"). The Scheduler is configured to run the command under the user ID FredUser. If FredUser is logged in to ComputerA when the Scheduler executes the command, it will fail with the error listed above. If FredUser is not logged on, the command will execute without error, even if a different user is logged on.

More Information

Note that the shutdown command must be run under a user account and cannot be run under the Local System account, which has permissions only for the local computer and not for the remote computer.

Also note that whatever account is used to execute the shutdown command must have the necessary privileges to shutdown the targeted computer.

If you want to schedule the shutdown of the local computer (the computer running the Scheduler), see article I02000043.

Workaround

Configure the Scheduler to run the program under an account that is not used to log in to the computer hosting the Scheduler. For example, create a special user account called RestartAccount that has the necessary privileges, and use that account when scheduling the shutdown command.

Status

Arcana Development believes this to be a problem with the Windows NT operating system and has confirmed that the same problem occurs when using the Windows NT AT scheduler. We are currently researching possible solutions to this problem.