{"id":414,"date":"2023-03-25T11:18:38","date_gmt":"2023-03-25T11:18:38","guid":{"rendered":"https:\/\/xuan.co.uk\/?p=414"},"modified":"2025-08-22T12:21:37","modified_gmt":"2025-08-22T12:21:37","slug":"active-bitlocker-using-pin-with-dos","status":"publish","type":"post","link":"https:\/\/xuan.co.uk\/?p=414","title":{"rendered":"Active bitlocker using PIN with DOS"},"content":{"rendered":"<p>@echo off<\/p>\n<p>cls<\/p>\n<p>:: if the batch file is not run as admin, quit<\/p>\n<p>net.exe session 1&gt;NUL 2&gt;NUL || (Echo This script requires admin elevated rights, exiting. &amp; echo. &amp; pause &amp; Exit \/b 1)<\/p>\n<p>echo This script will perform the following tasks:<br \/>\necho.<br \/>\necho &#8211; copy new group policy files to enable bitlocker pin requirement<br \/>\necho &#8211; reload the policy<br \/>\necho &#8211; trigger bitlocker encryption<br \/>\necho &#8211; type in the bitlocker pin 8 digits, you will not see your input, verify pin.<br \/>\necho &#8211; forced reboot in 5 secs (give time for encrytion to<br \/>\necho &#8211; on reboot encryption will enable, login and monitor status by clicking on key is desktray.<br \/>\necho.<\/p>\n<p>::find out what path the batch file is in<br \/>\nset batch_path=%~dp0<\/p>\n<p>::crop the last character and cd into it<br \/>\ncd %batch_path:~0,-1%<\/p>\n<p>:: change drive<\/p>\n<p>cd %CD%<\/p>\n<p>echo This batch file is being run from %batch_path%<br \/>\necho.<\/p>\n<p>&nbsp;<\/p>\n<p>xcopy GroupPolicy\\. c:\\windows\\system32\\GroupPolicy\\ \/s\/e\/y<\/p>\n<p>gpupdate \/force<br \/>\n::manage-bde -on C: -RecoveryKey D: -RecoveryPassword<br \/>\nmanage-bde -protectors -add c: -pw<br \/>\nmanage-bde -on -usedspaceonly C:<br \/>\nshutdown \/r -t 5<\/p>\n","protected":false},"excerpt":{"rendered":"<p>@echo off cls :: if the batch file is not run as admin, quit net.exe session 1&gt;NUL 2&gt;NUL || (Echo This script requires admin elevated rights, exiting. &amp; echo. &amp; pause &amp; Exit \/b 1) echo This script will perform the following tasks: echo. echo &#8211; copy new group policy <a class=\"more-link\" href=\"https:\/\/xuan.co.uk\/?p=414\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[81],"class_list":["post-414","post","type-post","status-publish","format-standard","hentry","category-tech-tips","tag-cmd"],"_links":{"self":[{"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/414","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=414"}],"version-history":[{"count":3,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/414\/revisions"}],"predecessor-version":[{"id":485,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/414\/revisions\/485"}],"wp:attachment":[{"href":"https:\/\/xuan.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xuan.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}