/ _ \ \_\(_)/_/ _//"\\_ more on JOHLEM.net / \ 0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0 License Management Commands: ----------------------------- 1. **Get-WmiObject** (Alias: `gwmi`) Retrieve Windows product key and license status via WMI. Syntax: Get-WmiObject -Query "SELECT * FROM SoftwareLicensingService" Example: $license = Get-WmiObject -Query "SELECT * FROM SoftwareLicensingService" $license 2. **Get-ProductKey** Retrieve the Windows product key from the registry. Syntax: (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId4").ProductKey 3. **slmgr /dli** (Command Prompt) Display basic Windows license information. Syntax: slmgr /dli 4. **slmgr /dlv** (Command Prompt) Display detailed Windows license information. Syntax: slmgr /dlv 5. **slmgr /xpr** (Command Prompt) Display Windows activation status. Syntax: slmgr /xpr 6. **slmgr /ipk** (Command Prompt) Install a new Windows product key. Syntax: slmgr /ipk "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" 7. **slmgr /ato** (Command Prompt) Activate Windows using the installed product key. Syntax: slmgr /ato 8. **slmgr /upk** (Command Prompt) Uninstall the current product key. Syntax: slmgr /upk 9. **slmgr /cpky** (Command Prompt) Clear the product key from the registry to prevent it from being stolen. Syntax: slmgr /cpky 10. **Get-OfficeProductKey** (Custom Script) Retrieve the Microsoft Office product key from the registry. Syntax: (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\16.0\Registration\{GUID}").DigitalProductID 11. **cscript ospp.vbs /dstatus** (Command Prompt) Check the activation status of Microsoft Office. Syntax: cscript "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /dstatus 12. **cscript ospp.vbs /inpkey:** (Command Prompt) Install a new product key for Microsoft Office. Syntax: cscript "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX 13. **cscript ospp.vbs /act** (Command Prompt) Activate Microsoft Office with the installed product key. Syntax: cscript "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /act 14. **slmgr /skms** (Command Prompt) Set a Key Management Service (KMS) host. Syntax: slmgr /skms "kms_server_name" 15. **slmgr /rearm** (Command Prompt) Reset the Windows activation timer (extend trial period). Syntax: slmgr /rearm +----------------------------------------------------------+ | Note: License management commands enable retrieval, | | installation, and management of Windows and Office| | product keys and activation statuses. | +----------------------------------------------------------+