Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Hello Matija R
Thank you for your inquiry and welcome to Microsoft Q&A forum.
I understand it's frustrating when a major OS upgrade disrupts existing licenses like this, especially in an air-gapped environment. The good news is that Office 2021 Home & Business is a perpetual retail license tied to the hardware, so the upgrade shouldn't invalidate it permanently, it's likely just a hiccup in the licensing cache or validation files not carrying over cleanly during the "keep files and apps" process. You don't need new licenses, and there are fully offline-compatible ways to resolve this without internet access.
The core fix involves two parts: first retrieving your existing full product key (which is still embedded in the system's registry from the pre-upgrade activation), then resetting the activation state and reactivating via phone (Microsoft's official offline method for retail licenses). This works for Office 2021 and doesn't require reinstalling the suite. Phone activation is a one-time call per machine to a Microsoft support line, where you provide an installation ID and get a confirmation ID in return, no internet involved.
Step 1: Retrieve Your Full Office Product Key (Offline, Using Built-in Tools)
The key is stored in the registry from your original activation. We'll use a PowerShell script to decode it, no downloads or external tools required.
- On the workstation, open Notepad (or any text editor).
- Copy-paste the script below into a new file, then save it as Get-OfficeKey.ps1 (ensure it's .ps1, not .txt).
- Right-click the file > Run with PowerShell (select "Yes" if prompted for execution policy).
- It will scan the registry and output the full 25-character key for Office 2021 Home & Business.
# Function to decode the DigitalProductID binary data to a product key
function Decode-OfficeKey {
param([byte[]]$BinaryKey)
$keyOutput = ""
$keyOffset = 52
$isWin8 = [Math]::Truncate($BinaryKey[66] / 6) -band 1
$BinaryKey[66] = ($BinaryKey[66] -band 0xF7) -bor (($isWin8 -band 2) * 4)
$i = 24
$maps = "BCDFGHJKMPQRTVWXY2346789"
do {
$current = 0
$j = 14
do {
$current = $current * 256
$current = $BinaryKey[$j + $keyOffset] + $current
$BinaryKey[$j + $keyOffset] = [Math]::Truncate($current / 24)
$current = $current % 24
$j--
} while ($j -ge 0)
$i--
$keyOutput = $maps[$current] + $keyOutput
$last = $current
} while ($i -ge 0)
if ($isWin8 -eq 1) {
$keypart1 = $keyOutput.Substring(1, $last)
$insert = "N"
$keyOutput = $keyOutput.Replace($keypart1, $keypart1 + $insert)
if ($last -eq 0) { $keyOutput = $insert + $keyOutput }
}
if ($keyOutput.Length -eq 26) {
return "{0}-{1}-{2}-{3}-{4}" -f
$keyOutput.Substring(1,5),
$keyOutput.Substring(6,5),
$keyOutput.Substring(11,5),
$keyOutput.Substring(16,5),
$keyOutput.Substring(21,5)
}
return $keyOutput
}
# Search for Office 2021 registration keys in the registry (64-bit; for 32-bit, change to WOW6432Node)
$officePath = "HKLM:\SOFTWARE\Microsoft\Office\16.0\Registration"
$keys = Get-ChildItem -Path $officePath -ErrorAction SilentlyContinue | ForEach-Object {
$regKey = Get-ItemProperty -Path $_.PSPath
if ($regKey.DigitalProductID -and $regKey.ProductName -like "*Office*2021*Home*Business*") {
$decodedKey = Decode-OfficeKey -BinaryKey $regKey.DigitalProductID
[PSCustomObject]@{
ProductName = $regKey.ProductName
GUID = $_.PSChildName
ProductKey = $decodedKey
}
}
}
# Display results
if ($keys) {
$keys | Format-Table -AutoSize
Write-Host "Full product key(s) retrieved. Use the one matching Home & Business."
} else {
Write-Host "No matching keys found. Try adjusting the ProductName filter or check 32-bit path: HKLM:\SOFTWARE\WOW6432Node\Microsoft\Office\16.0\Registration"
}
*Notes: Run as administrator if needed (right-click PowerShell > Run as admin, then execute .\Get-OfficeKey.ps1). If multiple keys show, pick the one for "Office 2021 Home and Business." Copy it securely—this is your original license.
Step 2: Reset the Activation State (Offline)
Clear corrupted licensing data from the upgrade. Close all Office apps.
- Open Command Prompt as administrator.
- Navigate to Office scripts: text
cd "C:\Program Files\Microsoft Office\Office16"
(Use C:\Program Files (x86)\Microsoft Office\Office16 for 32-bit installs.)
- Check status: text
cscript ospp.vbs /dstatus
Note partial keys (last 5 chars, e.g., "XXXXX").
- Remove them: text
cscript ospp.vbs /unpkey:XXXXX
Repeat until /dstatus shows no licenses.
- Delete folders (backup first if paranoid):
- Win+R > %localappdata%\Microsoft\Office > Delete 16.0 folder.
- Run regedit > Navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Licensing > Delete the key (export backup via File > Export).
- Win+R > %localappdata%\Microsoft\Office > Delete 16.0 folder.
Step 3: Reactivate via Phone (Offline, Using SLUI 4)
Re-enter the key, then use this built-in method for the phone dialog—it's more reliable for Office 2021 when the app wizard skips the option.
- Open an Office app (e.g., Word). If prompted, enter your full key from Step 1 and click Next (it'll fail online—expected).
- If no prompt: File > Account > Update Options > View Updates (or search "activation" in Help).
- For phone dialog: Press Win+R > Type slui 4 > Enter.
- Select your country/region from the dropdown—this shows a toll-free Microsoft number and Installation ID (long code).
- Call the number (automated or rep):
- Enter the Installation ID via keypad.
- Select option for new activation (or rep if automated fails; mention it's reactivation on same hardware post-OS upgrade).
- Get Confirmation ID back.
- Enter the Confirmation ID into SLUI (in A/B/C/D blocks) > Next. Office activates instantly.
- Verify: In Word > File > Account > Should show "Product Activated."
*Notes: This process takes ~5-10 minutes per machine. If rep needed, explain air-gapped setup, they handle retail reactivations. Numbers vary by region (e.g., US: 888-852-4510); SLUI lists yours. If "not supported" error, retry or use alternate number from support.microsoft.com/windows/product-activation-for-windows-online-support-telephone-numbers.
I hope this infor If you have any additional concern, feel free to comment below. I be more than happy to assist.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.