How To Check Microsoft Office License Key Using Cmd New! May 2026
cscript "C:\Program Files\Microsoft Office\Office14\OSPP.VBS" /dstatus (For Office 2007: Office12; Office 2010: Office14)
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 : how to check microsoft office license key using cmd
echo Set WshShell = CreateObject("WScript.Shell") > officekey.vbs echo MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")) >> officekey.vbs Note: This method works inconsistently on modern Office versions. A more reliable tool is required. While not a native CMD command, you can run a trusted tool silently via CMD to extract the Office key: cscript "C:\Program Files\Microsoft Office\Office14\OSPP