How To Check Microsoft Office License Key Using Cmd (2024)

ProduKey.exe /office 1 /scomma officekey.txt start officekey.txt This requires downloading ProduKey (NirSoft) beforehand. Although this report focuses on CMD, running PowerShell from CMD gives the most reliable result for modern Office:

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Registration /s Look for a key named DigitalProductID – but this will be binary, not readable directly. how to check microsoft office license key using cmd

powershell "Get-WmiObject -Class SoftwareLicensingProduct | Where-Object $_.Name -like '*Office*' | Select-Object PartialProductKey" This shows only the last 5 characters of the product key. Microsoft removed direct registry access to full keys in C2R versions. However, you can use a VBS script executed via CMD : ProduKey