2016-07-04 UPDATE: I have updated the hta script, because there was an issue with the Wi-Fi and UEFI detection. It is fixed now.
Last week I created this post on how you can do a UEFI check if you are installing Windows 10. I have extended that check with this Pre-Flight Check.
To make sure that a Pc is ready for your task sequence deployment and to minimize the risk of an error during OSD, you can do some checks before you start your OS deployment with a Pre-Flight check. This Pre-Flight check have to be at the beginning of your task sequence, because then you don’t break break anything on the existing installation if the requirement is not meet. This solution is using this hta with some customization that I have made.
Here is the things that I would like to check for:
– Only supported hardware models (To make sure that there is driver for the model)
– Network connection (To make sure that we can access the SCCM environment)
– No USB drives attached (To make sure that there is no USB drives attached)
– For laptops, AC power connected (So it is not running on battery)
– UEFI Check (To force UEFI if task sequence is Windows 10)
– Drive Encryption Check (To make sure that the HDD is not encrypted)
– WiFi check (To make sure that a laptop is not running the OSD on Wi-Fi)
If all the checks are Success, then the HTA will automatic countdown from 15 seconds and continue. Otherwise the user have to correct the problems and click on the ‘Refresh’ bottom to continue. The user cannot continue if ALL the check are not a success.
You have to have HTA-Support enabled in the boot image. To enable that do the following:
SCCM have updated your distribution points and your boot image have HTA support.
Now we are going to implement the HTA.
1. Download OSD Pre-Flight Checks.zip and extract the files to a folder called “OSD Pre-Flight Check”
2. There is 4 files that you can edit:
a. “background.png” You can add your own background
b. “logo.png” You can add your company loge
c. “ComputerModels_w7.txt” and “ComputerModels_w10.txt” These files are used for your supported computer models. The values here should be the same as the value in WMI in the Win32_ComputerSystemProduct Class in either Name or Version Property depending on you Manufacturer.
4. I’m using a computer variable called “ODSImage” where I write witch OS the task sequence should apply. In this example “WIN7alm” for Windows 7 and “WIN10alm” for Windows 10. If you have more images you should add them with an “OR” to line 144:
5. You can either create a share for the files or create a SCCM package. In this example I will use a share.
Copy the folder “OSD Pre-Flight Check” to a server and share it with read permissions.
9. Add these variables to the “Execute Task Sequence” group:
a. IsOnACPower equals TRUE
b. IsSupportedHardwareModel equals TRUE
c. IsUSBDriveAttached equals FALSE
d. IsOnNetwork equals TRUE
e. IsOnWiFi equals FALSE
f. IsUEFI equals TRUE
g. IsDiskEncrypted equals FALSE
That’s it. You now have a Pre-Check in your task sequence. Here is a couple of screenshots how it looks: