{"id":802,"date":"2016-07-03T20:12:14","date_gmt":"2016-07-03T18:12:14","guid":{"rendered":"http:\/\/www.rolig.dk\/?p=802"},"modified":"2016-07-03T20:12:14","modified_gmt":"2016-07-03T18:12:14","slug":"osd-pre-flight-check","status":"publish","type":"post","link":"https:\/\/rolig.dk\/?p=802","title":{"rendered":"OSD Pre-Flight check"},"content":{"rendered":"<p><strong>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.<\/strong><\/p>\n<p><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/strong><\/p>\n<p>Last week I created <a href=\"https:\/\/rolig.dk\/2016\/06\/22\/uefi-check-in-task-sequence\/\" target=\"_blank\" rel=\"noopener noreferrer\">this post<\/a> on how you can do a UEFI check if you are installing Windows 10. I have extended that check with this Pre-Flight Check.<\/p>\n<p>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&#8217;t break break anything on the existing installation if the requirement is not meet. This solution is using <a href=\"https:\/\/gallery.technet.microsoft.com\/OSD-Pre-Flight-Checks-cbb635f5\" target=\"_blank\" rel=\"noopener noreferrer\">this hta<\/a> with some customization that I have made.<\/p>\n<p>Here is the things that I would like to check for:<\/p>\n<p><em>&#8211; Only supported hardware models<\/em> (To make sure that there is driver for the model)<br \/>&nbsp;<em>&#8211; Network connection<\/em> (To make sure that we can access the SCCM environment)<br \/><em>&#8211; No USB drives attached<\/em> (To make sure that there is no USB drives attached)<br \/><em>&#8211; For laptops, AC power connected<\/em> (So it is not running on battery)<br \/><em>&#8211; UEFI Check<\/em> (To force UEFI if task sequence is Windows 10)<br \/><em>&#8211; Drive Encryption Check<\/em> (To make sure that the HDD is not encrypted)<br \/><em>&#8211; WiFi check<\/em> (To make sure that a laptop is not running the OSD on Wi-Fi)<\/p>\n<p>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 \u2018Refresh\u2019 bottom to continue. The user cannot continue if ALL the check are not a success.<\/p>\n<p>You have to have HTA-Support enabled in the boot image. To enable that do the following:<\/p>\n<p>1. Open your SCCM console and go to: Software Library \u2013&gt; Operation Systems \u2013&gt; Boot Images<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb.png\" width=\"600\" height=\"314\"><\/a><\/p>\n<p>2. Right click on your boot image and choose \u201cProperties\u201d<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-1.png\" width=\"600\" height=\"481\"><\/a><\/p>\n<p>3. Select the \u201cOptional Components\u201d tab.<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-2.png\" width=\"600\" height=\"623\"><\/a><\/p>\n<p>4. Click \u201cNew\u201d<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-3.png\" width=\"600\" height=\"623\"><\/a><\/p>\n<p>5. Select \u201cHTML (WinPE-HTA)\u201d and click \u201cOK\u201d<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-4.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-4.png\" width=\"600\" height=\"508\"><\/a><\/p>\n<p>6. Click \u201cOK\u201d<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-5.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-5.png\" width=\"600\" height=\"618\"><\/a><\/p>\n<p>7. Click \u201cYes\u201d to update the distribution points<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-6.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-6.png\" width=\"457\" height=\"204\"><\/a><\/p>\n<p>8. Click \u201cNext\u201d<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-7.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-7.png\" width=\"600\" height=\"513\"><\/a><\/p>\n<p>9. SCCM is now doing it\u2019s thing\u2026..<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-8.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-8.png\" width=\"600\" height=\"511\"><\/a><\/p>\n<p>10. Click \u201cClose\u201d<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-9.png\" width=\"600\" height=\"511\"><\/a><\/p>\n<p>SCCM have updated your distribution points and your boot image have HTA support.<\/p>\n<p>Now we are going to implement the HTA.<\/p>\n<p>1. Download <a href=\"https:\/\/1drv.ms\/f\/s!AvUjoCp_23pE1SMUyw4kEHzcBH5w\" target=\"_blank\" rel=\"noopener noreferrer\">OSD Pre-Flight Checks.zip<\/a> and extract the files to a folder called \u201cOSD Pre-Flight Check\u201d<\/p>\n<p>2. There is 4 files that you can edit:<br \/>a. \u201cbackground.png\u201d You can add your own background<br \/>b. \u201clogo.png\u201d You can add your company loge<br \/>c. \u201cComputerModels_w7.txt\u201d and \u201cComputerModels_w10.txt\u201d 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.<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-10.png\" width=\"600\" height=\"160\"><\/a><\/p>\n<p>3. Edit the \u201cPreFlight.hta\u201d line 154 and add the IP address of the servers that you would like to ping. Ex. your SCCM servers<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-11.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-11.png\" width=\"600\" height=\"136\"><\/a><\/p>\n<p>4. I\u2019m using a computer variable called \u201cODSImage\u201d where I write witch OS the task sequence should apply. In this example \u201cWIN7alm\u201d for Windows 7 and \u201cWIN10alm\u201d for Windows 10. If you have more images you should add them with an \u201cOR\u201d to <strong>line 144<\/strong>:<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-25.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-25.png\" width=\"600\" height=\"163\"><\/a><\/p>\n<p>and <strong>line 193<\/strong>:<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-26.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-26.png\" width=\"600\" height=\"143\"><\/a><\/p>\n<p>and <strong>line 237<\/strong>:<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-27.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-27.png\" width=\"600\" height=\"165\"><\/a><\/p>\n<p>5. You can either create a share for the files or create a SCCM package. In this example I will use a share.<br \/>Copy the folder \u201cOSD Pre-Flight Check\u201d to a server and share it with read permissions.<\/p>\n<p>6. Create a New Group at the beginning of your task sequence and called it \u201cOSD Pre-Flight Check\u201d<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-12.png\" width=\"537\" height=\"242\"><\/a><\/p>\n<p>7. Add a \u201cConnect to Network Folder\u201d step and call it \u201cConnect to OSD Pre-Flight Check Folder\u201d. Path=\\\\SERVER\\SHARE, Drive: z:, Account: \u201c<em>A account that have access to the share<\/em>\u201d<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-16.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-16.png\" width=\"600\" height=\"210\"><\/a><\/p>\n<p>8. Add a \u201cRun Command Line\u201d step and call it \u201cRun OSD Pre-Flight Check\u201d. Command line: Z:\\PreFlight.hta, Start in: Z:\\<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-17.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-17.png\" width=\"600\" height=\"287\"><\/a><\/p>\n<p>9. Add these variables to the \u201cExecute Task Sequence\u201d group:<br \/>a. IsOnACPower equals TRUE<br \/>b. IsSupportedHardwareModel equals TRUE<br \/>c. IsUSBDriveAttached equals FALSE<br \/>d. IsOnNetwork equals TRUE<br \/>e. IsOnWiFi equals FALSE<br \/>f. IsUEFI equals TRUE<br \/>g. IsDiskEncrypted equals FALSE<br \/><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-18.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-18.png\" width=\"600\" height=\"237\"><\/a><\/p>\n<p>That\u2019s it. You now have a Pre-Check in your task sequence. Here is a couple of screenshots how it looks:<\/p>\n<p><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-19.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-19.png\" width=\"600\" height=\"451\"><\/a><\/p>\n<p><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-20.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-20.png\" width=\"600\" height=\"451\"><\/a><\/p>\n<p><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image-21.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/07\/image_thumb-21.png\" width=\"600\" height=\"451\"><\/a><\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Frolig.dk%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F802&amp;text=Hey%20check%20this%20out\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/rolig.dk\/wp-content\/plugins\/social-media-feather\/synved-social\/addons\/extra-icons\/image\/social\/circle\/96x96\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&amp;url=https%3A%2F%2Frolig.dk%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F802&amp;title=OSD%20Pre-Flight%20check\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/rolig.dk\/wp-content\/plugins\/social-media-feather\/synved-social\/addons\/extra-icons\/image\/social\/circle\/96x96\/linkedin.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>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. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[44],"class_list":["post-802","post","type-post","status-publish","format-standard","hentry","category-sccm","tag-sccmosdcheckpre-flight"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts\/802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=802"}],"version-history":[{"count":0,"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts\/802\/revisions"}],"wp:attachment":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}