How to Restart a Server with a Batch File Without Needing Login?

0
15
Asked By CuriousCat42 On

Hey everyone! I'm trying to restart a server using a batch file, and I came across this command: 'shutdown /r /t 0'. However, the issue is that the command runs, but then it stops when it prompts for a username and password. I really need to get this server back up and running without manual intervention. Does anyone know how to bypass this issue? Thanks in advance!

2 Answers

Answered By AdminGenius88 On

Are you running the batch file through a scheduled task? You can select 'Run whether user is logged on or not' to save the credentials, and ensure 'run with highest privileges' is checked. That should help!

SafetyFirst04 -

Also, don’t forget to give the account running the job the Logon as Batch Job permission.

Answered By TechWhiz99 On

You might want to tweak your command to 'shutdown /r /f /t 0'. Just a heads up, avoid using this on SQL or other database servers, though!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.