OSDeploy | Sune Thomsen
TwitterLinkedInWindows 365 CommunityMVP ProfileGitHub
  • Home
  • Blog
    • Microsoft Intune
      • How to migrate BitLocker key(s) from all fixed drives to Microsoft Entra ID.
      • Migrate Bitlocker Recovery Key(s) to Azure AD with Proactive Remediation
      • Migrate imported GPOs to Intune with Group Policy analytics (preview)
      • Group Policy analytics (preview) made a bit easier with PowerShell
      • Analyze on-premises GPOs with MEM Group Policy Analytics (preview)
    • Virtual Machine
      • Fix the Hyper-V virtual switches after updating to Windows 11 (22H2)
    • 🆕Windows 365
      • 🆕Windows 365 Boot: Why User-Driven Mode?
      • 🆕Enhancing Security With Intune MAM (preview) for Windows 365
      • The Concept of Windows 365 Switch
      • The Concept of Windows 365 Boot
      • The Concept of Windows 365 Frontline
      • Move Cloud PCs to a new Azure Region or Azure Network Connection
      • Windows 365 End-User Experience (Tips & Tricks) – Part 4. Windows 365 app and Cloud PC reporting
      • Windows 365 End-User Experience (Tips & Tricks) – Part 3. Multimedia Redirection
      • Windows 365 End-User Experience (Tips & Tricks) – Part 2. Teams Optimization, SSO, and Localization
      • Windows 365 End-User Experience (Tips & Tricks) – Part 1. Connection experience
      • How to Configure Windows 365 Azure AD Join Single Sign-on (SSO)
      • Keep Windows 365 current and stay current with Windows Autopatch
      • Provide the end-users with a localized Windows 365 Cloud PC experience
      • How to configure Windows 365 Enterprise Azure AD join
      • How to secure Windows 365 using a FIDO2 security key
      • Prevent sensitive information from being captured on Windows 365 CPCs
      • Manage local administrator rights on Windows 365 Cloud PCs.
      • How to create a custom image for Windows 365 Enterprise Cloud PCs
      • How to reprovision existing Cloud PC (Windows 365) to Windows 11
      • How to configure Windows 365 Enterprise in Microsoft Endpoint Manager
  • Archive
    • Deployment
      • OSDCloud: The ZTI Way
      • OSDBuilder: WinPE Customization
    • Microsoft Configuration Manager
      • ConfigMgr: Run "All" Client Actions During OSD
      • ConfigMgr: WIM Your Applications Like a Boss
      • ConfigMgr: Deploy UWP Applications During OSD
      • ConfigMgr: Building a Basic LAB Environment
        • Part 1 - Installing Windows 10 (1909) on the Host
        • Part 2 - The Host and Hyper-V Configuration
        • Part 3 - Setting up the Domain Controller
          • Active Directory
          • DHCP
          • DNS
        • Part 4 - Setting up Microsoft Endpoint Configuration Manager
          • Prerequisites
          • SQL
        • Part 5 - Setting up Discovery Methods and Boundaries
        • Part 6 - Setting up Software Update Point
      • ConfigMgr: Splash Screen for Driver and BIOS Update
      • ConfigMgr: Global Conditions for Dell WD15 Dock Detection
    • Microsoft Intune
      • Block personally owned devices in Intune with enrollment restrictions
      • Remove Windows 10 built-in apps with Intune & Microsoft Store for Business Apps
    • Windows
      • Win10: Multi-Language Toast Notifications
        • Toast Notification: Low Disk Space
  • Links
    • Blogs
    • Microsoft
    • Scripts
Powered by GitBook
On this page
  • BEFORE YOU BEGIN
  • Migrate BitLocker key(s) from all fixed drives
  • Remediation verification
  • The improved script output in Microsoft Intune
  • Summary

Was this helpful?

  1. Blog
  2. Microsoft Intune

How to migrate BitLocker key(s) from all fixed drives to Microsoft Entra ID.

20-11-2023 7:21 PM

PreviousMicrosoft IntuneNextMigrate Bitlocker Recovery Key(s) to Azure AD with Proactive Remediation

Last updated 8 months ago

Was this helpful?

BEFORE YOU BEGIN

Disclaimer: All information and content in this blog post is provided without any warranty whatsoever. The entire risk of using this information or executing the provided content remains with you. Under no circumstances should the mentioned persons or vendors, the author, or anyone else involved in creating these blog posts be held liable for any damage or data loss.

It's been almost a year since I published my original post about how to migrate BitLocker Recovery Key(s) to Azure AD (Microsoft Entra ID) using a remediation script. It didn't take long before several companies started using it, and since then, I've received a few inquiries about support for multiple fixed drives.

Today, I'm excited to announce the release of an updated version of the remediation script, which supports multiple fixed drives and an improved script output in Microsoft Intune.

Important: Read about the prerequisites and requirements for remediation scripts in Microsoft Intune and the script usage in the original blog post here ⤵️

In this post, I'll cover the following topics.

Migrate BitLocker key(s) from all fixed drives

In the variables section of both scripts, you will find a new global variable named $Global:CheckAllDrives with a default value set to $false (see the screenshot below)

  • If set to $false (default) - the script will only check the system drive.

  • If set to $true - the script will check all fixed drives.

So, if you want to check all fixed drives on your devices, change this new global variable to $true in both the detect and the remediation script and upload them to Microsoft Intune.

Tip: Although changing the event log time variable is optional, I suggest you change it to the date you plan to put the scripts into production.

Remediation verification

After uploading both scripts to Microsoft Intune, it's time to verify that everything works as intended.

The first place I will check is in the IntuneProactiveRemediation log file.

C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneProactiveRemediation.log

As you can see in the example below, the script checks drive C:, E:, and F:

The second place I will check is in the Event Viewer.

Applications and Services Logs | Microsoft | Windows | BitLocker-API | Management

The third and final place I would check is in the Registry Editor.

HKEY_LOCAL_MACHINE\SOFTWARE\CompanyName\BitLocker

The improved script output in Microsoft Intune

Let's have a look at the improved script output in Microsoft Intune.

The Device status overview provides visibility into the detection and remediation status. The following example shows that the detection process finished with issues, and the remediation failed.

Let's look at what information the output can provide us. In the below example, we can see that the improved script output now supports multiple outputs!

  • Output 1 - BitLocker protection status of drive 'C:' is = Off. - Please ensure that the BitLocker protection is turned on and not temporarily suspended.

  • Output 2 - BitLocker recovery key(s) from drive 'E:' is not stored in Azure AD. - Run remediation script…

Note: The script output(s) are separated with [Output 1] + [Output 2] + [Output 3]...

Why did the remediation fail? – Because I'd temporarily suspended the BitLocker protection on drive C:

Summary

In this blog post, you learned about the new capabilities of my remediation script used for migrating BitLocker key(s) to Microsoft Entra ID. You should now be able to upload BitLocker key(s) for all fixed drives to Microsoft Entra ID and check the improved script output in Microsoft Intune.

That's it, folks. Happy testing, and have fun exploring 🤓 If you have any questions regarding this topic, please feel free to reach out to me.

Important: Please download the and script from my before continuing.

Note: As stated in my , you still need to change the "CompanyName" in the registry path to a name of your choice (such as your company name).

Go to Next, go to Devices | Remediations (under Policy) and select your script package from the overview. Choose Device status (under Monitor) in the script package.

detection
remediation
GitHub repository
original blog post
https://intune.microsoft.com
Migrate BitLocker key(s) from all fixed drives
Remediation verification
The improved script output in Microsoft Intune
Summary
Migrate Bitlocker Recovery Key(s) to Azure AD with Proactive RemediationOSDeploy | Sune Thomsen
Logo
Page cover image