{"id":1074,"date":"2016-06-22T10:51:05","date_gmt":"2016-06-22T08:51:05","guid":{"rendered":"http:\/\/www.rolig.dk\/?p=1074"},"modified":"2016-06-22T10:51:05","modified_gmt":"2016-06-22T08:51:05","slug":"uefi-check-in-task-sequence","status":"publish","type":"post","link":"https:\/\/rolig.dk\/?p=1074","title":{"rendered":"UEFI check in task sequence"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>In this post I will show you have to create 3 steps in your task sequence that checks if the computer is running UEFI. This is useful if you are installing Windows 10 and want to make sure the UEFI is enabled. The check is running at the start of the task sequence, so it doesn&#8217;t format the disk if the BIOS setting is not UEFI. This means that you can boot the Pc with the old installation if the check fails. If you want to semi automate the switch from BIOS to UEFI, see <a href=\"https:\/\/rolig.dk\/2016\/06\/01\/change-boot-from-bios-to-uefi-semi-automatic\/\" target=\"_blank\" rel=\"noopener noreferrer\">this post<\/a>. 1E have a fully automated process and you can get more information <a href=\"http:\/\/www.1e.com\/blogs\/2016\/06\/13\/automate-bios-uefi-secure-windows-10-2\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>. Nickolai Andersen have a <a href=\"http:\/\/www.scconfigmgr.com\/2016\/06\/14\/switch-from-bios-to-uefi-on-dell-systems-during-windows-10-deployment-with-configmgr\/\" target=\"_blank\" rel=\"noopener noreferrer\">blog post<\/a> where he automate the switch on Dell computers. Thanks to the <a href=\"http:\/\/garytown.com\/enforce-uefi-during-osd-or-nicely-fail-with-remediation\" target=\"_blank\" rel=\"noopener noreferrer\">blog post on Garytown<\/a> for the inspiration.<\/p>\n<p>&nbsp;<\/p>\n<p>1. Download <a href=\"https:\/\/1drv.ms\/f\/s!AvUjoCp_23pE1SMUyw4kEHzcBH5w\" target=\"_blank\" rel=\"noopener noreferrer\">UEFI_Check.zip<\/a> and create a package, without a program, in SCCM called \u201cUEFI Check\u201d<\/p>\n<p>2. Create a New Group at the beginning of the task sequence and call it \u201cUEFI Check for Windows 10\u201d<\/p>\n<p><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image-26.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image_thumb-26.png\" width=\"564\" height=\"559\"><\/a><\/p>\n<p>3. Add the following conditions to the group:<\/p>\n<p>a. If All conditions are true<br \/>aa. Task Sequence variable: OSDImage equals \u201cWIN10\u201d (If you don\u2019t have more then on image in your TS, then you don\u2019t need this step.)<br \/>ab. Task Sequence variable: _SMSTSBootUEFI not equals \u201cTrue\u201d (This is used to check for UEFI)<br \/>ac. Task Sequence variable: _SMSTSinWinPE equals \u201cTrue\u201d (This is to make sure that this step is only running in WinPE)<br \/>ad. If ANY conditions are true<br \/>aaa. WMI Query: SELECT * FROM Win32_ComputerSystem WHERE Model LIKE &#8220;%HP%&#8221; (This is to make sure that it runs on a HP computer.)<br \/>aab. WMI Query: Select * from Win32_ComputerSystem WHERE Manufacturer like &#8220;%Hewlett-Packard%&#8221; (This is to make sure that it runs on a HP computer.)<br \/>aac. WMI Query: SELECT * FROM Win32_ComputerSystem WHERE Manufacturer LIKE &#8220;%Dell%&#8221; (This is to make sure that it runs on a DELL computer.)<\/p>\n<p><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image-27.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image_thumb-27.png\" width=\"644\" height=\"372\"><\/a><\/p>\n<p>4. Create a \u201cRun command line\u201d step in the group you created in step 2 and call it \u201cUEFI Check\u201d.<\/p>\n<p><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image-28.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image_thumb-28.png\" width=\"642\" height=\"615\"><\/a><\/p>\n<p>4. Choose the package that you made in step 1 and add the message that you want to display. The syntax is:<br \/>cscript.exe MDTMessageBox.wsf \/text:\u201dWARNING &#8211; This Machine is not set to UEFI in the BIOS &#8211; Please Shutdown, fix the Setting and Start again\u201d \/type:64 \/title:\u201dUEFI\u201d<\/p>\n<p><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image-29.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image_thumb-29.png\" width=\"782\" height=\"432\"><\/a><\/p>\n<p>5. Add a \u201cRun Command line\u201d step after your UEFI Check for Windows 10 in the group you created in step 2 and call it \u201cShutdown WinPE UEFI Fails\u201d. This step will shutdown the Pc if the Pc doesn&#8217;t have UEFI set.<\/p>\n<p><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image-34.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image_thumb-34.png\" width=\"532\" height=\"577\"><\/a><\/p>\n<p>6. Command line: Shutdown.exe, Package: UEFI Check<\/p>\n<p><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image-33.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image_thumb-33.png\" width=\"661\" height=\"587\"><\/a><\/p>\n<p>7. You task sequence should look like this now:<\/p>\n<p><a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image-35.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/06\/image_thumb-35.png\" width=\"535\" height=\"581\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>With the above step in the task sequence, it will fail if you try to install Windows 10 on a Pc where UEFI is not set in the BIOS.<\/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%252F1074&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%252F1074&amp;title=UEFI%20check%20in%20task%20sequence\" 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>&nbsp; In this post I will show you have to create 3 steps in your task sequence that checks if the computer is running UEFI. This is useful if you are installing Windows 10 and want to make sure the UEFI is enabled. The check is running at the start of the task sequence, so [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4],"tags":[31],"class_list":["post-1074","post","type-post","status-publish","format-standard","hentry","category-sccm","tag-osduefibioswindows-10"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts\/1074","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=1074"}],"version-history":[{"count":0,"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts\/1074\/revisions"}],"wp:attachment":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}