Tag Archives: automated reboot

Powershell – Automated Reboot Script – Schedule as a Task

ps  So I’m sure some of you are in smaller environments and don’t have a PC Management system in place (SCCM, Altiris, Etc).  I created a Powershell script that sends the command and also does error logging.  The results of the script are sent via SMTP.

In this case, I created a script that runs at 2am local time and created a scheduled task on the server to run the Powershell script.  The basic functionality is that it reads a Active Directory Group to get the Computer Names you would like to reboot.  It then attempts to send a Shutdown -R command to all machines.  It will keep track of the results and then send a HTML formatted E-Mail via SMTP.  Feel free to modify the code to save to a file if you would like instead.  This script uses Quest’s Powershell Active Roles commands.  I would recommend you down them also.

Download Link

HTML E-Mail with Results:

automatedreboot