![]() Write-host "ERROR: Windows could not be activated." Write-host "ERROR: Changing license key failed"Ĭscript.exe "$env:SystemRoot\System32\slmgr.vbs" /ato Write-host "ERROR: Failed to retrieve firmware-embedded product key"Ĭscript.exe "$env:SystemRoot\System32\slmgr.vbs" /ipk "$EmbeddedKey" Write-host "Firmware-embedded product key is "$EmbeddedKey"" $EmbeddedKey=(Get-CimInstance -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey Start-Transcript -Path $Transcript | Out-Null $Transcript = "C:\programdata\Microsoft\IntuneManagementExtension\Logs$($(Split-Path $PSCommandPath -Leaf).ToLower().Replace(".ps1",".log"))" ![]() # Description : Script retrieves the firmware-embedded product key and activates Windows # This is the complete activation script: # - # Get-WmiObject SoftwareLicensingProduct -Filter "ApplicationID = '55c92734-d682-4d71-983e-d6ec3f16059f' and LicenseStatus = '1'" I’ll use the below command to check if the ProductKe圜hannel is changed to OEM:DM, in the detection script, but also to write it to the transcript. Slmgr.vbs is used to install and activate the key. With this command, we can retrieve information regarding the Windows license, including the Original Product Key: Get-CimInstance -query 'select * from SoftwareLicensingService' As I wanted to deploy the script as a win32 app with Microsoft Intune, I also created a small detection script. I’ve created the below script to get the job done. With a small PowerShell script, we can easily query the device for its ‘baked-in’ product key and use that key to active Windows, so the device doesn’t have to reach out to a KMS server anymore for activation. But this only happens automatically during the Out of the Box Experience. If you’re using a subscription activation Windows license (Windows E3/ E5 license), subscription activation should automatically pull the firmware embedded activation key and activate the underlying pro license. An option is to activate Windows with the firmware embedded product key, which is available on most (business) laptops. You could end up with devices, which still try to activate Windows after a factory reset by reaching out to a KMS server that is not reachable. But when you migrate these devices to Azure AD only joined devices, these devices might not have direct access to the on-premises environment anymore. Windows devices that are Active Directory joined (or Hybrid Azure Active Directory joined), might be activated by using an on-premises KMS server, which has been (and still is) perfectly fine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |