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

Azure Hyper-V Lab for Intune
Microsoft Intune

Create Your Own Hyper-V Intune Lab on Azure: A Step-by-Step Guide

Build an Intune test lab on Azure using Hyper-V nested virtualisation. Step-by-step guide to create an isolated Windows 11 environment for Autopilot testing.

Manage and monitor secure boot update with Intune
Microsoft Intune

Intune Secure Boot Certificate Update: Fix Before the 2026 Deadline

Prepare your Intune devices for the Secure Boot certificate expiry in 2026. How to opt in, monitor deployment, and detect update issues.

Custom Compliance Policies in Intune: When and How to Use Them
Intune Starter Series

Custom Compliance Policies in Intune: When and How to Use Them

Use custom compliance in Intune to check services, registry keys, and files. Includes scripts, JSON, and setup tips.