scloud by Florian Salzmann
ende

How to Activate Windows Using BIOS Keys in Intune

  • Florian Salzmann
  • Posted on 14 May, 2021
  • Updated on 05 Mar, 2026
  • 02 Mins read
  • Microsoft Intune

If you’re encountering activation issues on a device that’s been restarted using a USB stick or Intune Wipe/Fresh Start, even though you have a valid BIOS Windows key, don’t worry. You can use PowerShell and a WMI query to retrieve the key and activate Windows. In this article, we’ll guide you through the process of Windows activation with BIOS keys in Intune.

Windows Activation with BIOS Key

Sometimes, after a device restart using a USB stick or Intune Wipe/Fresh Start, Windows may not activate automatically, even if you have a valid BIOS Windows key. To resolve this, you can utilize PowerShell and a WMI query to activate Windows using the BIOS key.

# Windows activation with BIOS Key
if((Get-CimInstance -ClassName SoftwareLicensingProduct | Where-Object {$_.name -match 'windows' -AND $_.PartialProductKey}).LicenseStatus -ne '1'){
    Write-Host "BIOS Key wird aktiviert"
    slmgr /ipk (Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey
    slmgr /ato
}

This script can be deployed to all your devices. If a device is already activated via BIOS, MAK, or KMS, the script will have no effect.

Windows Activation with MAK Key

But what if you want to address devices without a BIOS key? You can save a MAK key and use it for activation in case these devices are not activated. Here’s how:

# Windows activation with MAK key
$MAK = "AAAAA-BBBBB-CCCCC-DDDDD-EEEEE"
if((Get-CimInstance -ClassName SoftwareLicensingProduct | Where-Object {$_.name -match 'windows' -AND $_.PartialProductKey}).LicenseStatus -ne '1'){
    Write-Host "MAK Key wird aktiviert"
    slmgr /ipk $MAK
    slmgr /ato
}

Both scripts should be saved as PS1 files for distribution, and you can then upload them to Intune. Follow these steps:

  1. Go to “Devices” > “Windows” > “PowerShell scripts” in Intune.
  2. Click ”+ Add” to upload the script.
  3. Assign a suitable name and upload the script.
  4. Finally, assign the script to the relevant devices.

By following these steps, you can ensure that your Windows devices are activated correctly using BIOS keys and Intune, even if they’ve undergone a restart or refresh process. This streamlined activation process can save you time and effort in managing your Windows devices.

Related posts

Dynamic Autopilot Groups: Multi-Tag, Exclusions & When to Stop
Microsoft Intune

Advanced Dynamic Autopilot Group Queries for Production (Autopilot v1)

I use these dynamic Autopilot group queries in production for multiple tags, exclusions, and prefix matching. Keep them simple to avoid maintenance pain.

Native App Removal in Intune Settings Catalog - dynamic removal list with Lovable PFN entered
Microsoft Intune

Remove Any Preinstalled Microsoft Store App with Intune Settings Catalog

Removing custom Microsoft Store apps in Intune used to mean OMA URI and a registry fix. Settings Catalog now does it natively.

802.1X Wi-Fi Failing - Check Your Assignments
Microsoft Intune

802.1X Wi-Fi Failing? Check Your Certificate Chain

Troubleshooting 802.1X Wi-Fi in Microsoft Intune? Learn why assigning Wi-Fi, Root CA, Intermediate CA, and SCEP or PKCS profiles to different groups can cause certificate chain issues and failed authentication.