Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm looking at running a script to reboot a Windows 2012 server nightly, and all the guides seem to be for using scheduled tasks. As far as I know though, a change in the admin credentials will break the task.

Is there a tool/script out there that means I won't need to use these credentials as we keep the passwords for a very short time.

Feel free to ask any more questions

share|improve this question
    
Domain member or standalone server? –  Mathias R. Jessen Jul 31 at 22:26
4  
This begs the larger question: why do you want to reboot a domain controller nightly? –  MDMarra Jul 31 at 22:28
1  
So, if it is a temporary solution, don't change admin credentials during this temporary period ;) –  krisFR Jul 31 at 22:42
1  
Or create a dedicated account in your AD to run this reboot task with, and do not apply any password policy to this special account... –  krisFR Jul 31 at 22:59
2  
Why haven't you posted a question about the underlying issue? It's probably interesting. My doctor wouldn't be amused if I asked her for a way to keep the blood stains off my bed. She would want to find out why I was bleeding. –  Skyhawk Aug 1 at 3:57

1 Answer 1

up vote 6 down vote accepted

Lets ignore that periodically rebooting server a DC is generally a bad idea, and shouldn't be required. Lets just focus on the part of your question about schedule tasks, and managing password for the account you use.

The answer to your core question is that in recent versions of Windows you are supposed to use Managed Service Accounts. Of course if your task doesn't need any access on the network at all, and you aren't worried too much about security, you could also set it to run as the system account.

Managed service accounts are a feature that permit you to use an account without knowing or manage the password at all. Windows will handle this for you.

Using a managed service account isn't easy, but here an tutorial that shows using a managed service account with a schedule task.

share|improve this answer
2  
+1 for System account. He won't win any awards for most security-conscious sysadmin for running scheduled tasks as System, especially on a DC, but he's already doing something silly by rebooting a DC nightly so what the heck. –  Ryan Ries Aug 1 at 3:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.