03 October 2014

Windows Reboot Verification Script

The firm I work for does a weekly reboot. As we revamped our SCCM and AD, it was time to revisit the reboot process. I decided to use PowerShell in conjunction with SCCM to handle this process. To make the process easier to maintain and verify, I split it into two parts. There is the reboot script and the verification script. The reboot script creates an empty log file called NotRebooted.log and reboots the PC. It also deletes any file that is from the previous successful reboot. The verification script looks for the NotRebooted.log file and renames it to Rebooted--02-Oct-2014.log for instance. The filename tells that it was rebooted and the date it happened. This provides for an easy verification without having to search through the event viewer logs. To set this up in SCCM, I created two deployments, Reboot and RebootVerify. I setup RebootVerify to run Reboot first. Of course the Reboot is also set to look for a reboot by the program and not SCCM. That is all that is to doing this. IMO, this makes it much easier to track reboots, at least it has here where I work.

Here are the links to download the scripts:


Related Posts:

  • Application Uninstall Script This script will uninstall an application with just the partial description that is listed in Add/Remove programs. It searches the product list and then grabs the GUID to use in the MSI uninstallation. At current, it will o… Read More
  • PowerShell One-Liners to ensure Dell system is configured for UEFI when imaging While planning and configuring the Windows 10 upgrades, we had to also include the transition to UEFI from BIOS. I wanted to make sure that when the build team builds new models that they are configured for UEFI when applica… Read More
  • Get Default Printer The new and updated Default Printer report is located here. This script will find the default printer of a logged on user and write it to a text file named DefaultPrinter.txt in the %APPDATA% folder. I have this script run… Read More
  • Robocopy User Profile Contents to UNC Path The Windows 10 upgrades required us to move profile contents off of the machines to a file share and then move them back. This was because USMT could not be used due to the architecture changing from 32-bit to 64-bit. This … Read More
  • Find out who is logged on and logged off Being an SCCM administrator, I often have to log into machines to see if a deployment went ok. Trying to login to machines and getting the message that someone is already logged in gets tiring. Ed Wilson originally wrote a … Read More

0 comments:

Post a Comment