This PowerShell script allows you to retrieve the last five characters of the Microsoft Office product key from the Windows registry. It supports various Office versions including 2010, 2013, 2016, 2019, 2021, and Office 365.
- Windows operating system
- PowerShell (Version 5.0 or later)
- Administrator privileges to access the registry
-
Download the Script:
Save the provided PowerShell script as
Get-OfficeProductKey.ps1
on your computer. -
Run the Script:
Open a PowerShell window with administrator privileges. Navigate to the directory where the script is saved, then run the script using the following command:
.\Get-OfficeProductKey.ps1