From be6ac5a4be4e73b8fd6adf4a81e40fe6caeaadb6 Mon Sep 17 00:00:00 2001 From: Andrei-George Stoica Date: Mon, 15 Nov 2021 13:07:39 +0200 Subject: [PATCH] Adding PowerShell alternative since WMIC is not supported on Win11 --- windows/deployment/windows-10-subscription-activation.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/windows/deployment/windows-10-subscription-activation.md b/windows/deployment/windows-10-subscription-activation.md index 4d6d62258a..77ecc22723 100644 --- a/windows/deployment/windows-10-subscription-activation.md +++ b/windows/deployment/windows-10-subscription-activation.md @@ -249,6 +249,11 @@ changepk.exe /ProductKey %ProductKey% ) ``` +Since [WMIC was deprecated](https://docs.microsoft.com/windows/win32/wmisdk/wmic) in Windows 10, version 21H1, run this PowerShell alternative: +```console +$(Get-WmiObject SoftwareLicensingService).OA3xOriginalProductKey | foreach{ if ( $null -ne $_ ) { Write-Host "Installing"$_;.\changepk.exe /Productkey $_ } else { Write-Host "No key present" } } +``` + ### Obtaining an Azure AD license Enterprise Agreement/Software Assurance (EA/SA):