WinPE Scripting Overhaul

Background

Windows PE is used by Missouri S&T to run software that performs full-system backups of a computer before it is either rebuilt, reclaimed, or retired by the Information Technology department.

The Windows PE image for Missouri S&T was originally designed for AFS (Apple File System), before they migrated to DFS (Distributed File System), and Symantec Ghost. In 2018, Missouri S&T switched from Ghost to Macrium, from Paramount Software.

The existing image, while updated to use a Windows 10 based PE, still used many of the original Perl scripts to sign IT staff into network drives. As of Spring 2019, some of the older directories it attempted to use were removed, which generated errors when logging in, but still allowed IT staff to use the image. It also required that the system on which it was being used to have more than 2GB of RAM. As Missouri S&T was in the process of decommissioning several Dell Optiplex 745s, 760s, and 780s that only had 2GB of RAM, this increased processing time when the hardware had to be modified.

In addition, the IT department had changed how it processed backups since the original conception of the existing scripts. Each division now had their own local storage repositories that were then synchronized with a centralized location.

With the Domain Migration Project in the UM System, it was quickly found that the scripts did not support the new domain and only referenced the soon-to-be-retired domain.

Solution

A small team was made in the Desktop Deployment division of Missouri S&T’s IT department to build a new WinPE image that would support the newest changes to the infrastructure not only at Missouri S&T but at the UM System. One team member worked on the base image – which included drivers for supported Dell machines and other optimizations – while I wrote the new login scripts.

I chose to abandon the use of Perl scripting because it required the large Perl libraries that Missouri S&T uses to be added to the image and used as much built-in Microsoft software as possible. After failing to find a secure way to collect the user’s password using only a batch script, Powershell was added to the base WinPE image. Powershell was used only for password management as was invoked inside the batch script. It was also found to use less space than Perl and when combined with the Dell drivers, still used less space than the previous image. This smaller footprint allows the image to run even on Optiplex 745s with only 2GB of RAM.

The new login scripts were also customized for each division of IT at Missouri S&T. Each division (Help Desk, Desktop ECE, Desktop Deployment, and Desktop Professionals) would now only have to enter their credentials once and have their local repositories mapped along with the central repository. If the computer failed to map the network drives correctly, then it would refuse to load Macrium and allow the user to retry the login process or check the computer’s networks status.

Other features added to the new image include power options, such as restarting and shutting down, a portable version of CrystalDisk to allow users to check hard drive health, and options to reload Macrium or use a command prompt.

Overall the new login scripts total only 150 lines.