Share via


SharePoint 2016 product license

Question

Friday, July 12, 2019 8:27 PM

Hello,

I need to add another server to my SharePoint farm and unfortunately I have lost the production key I used originally when setting up the SharePoint farm. Is there a way to find this product key in the registry on the front end server so I can install SharePoint on the search server?

thanks,

Sherazad

All replies (5)

Monday, July 15, 2019 2:24 PM âś…Answered

Hi Sherazad,

For SP 2016 Just run the below code that will get you the key.

Add-Pssnapin "Microsoft.SharePoint.PowerShell"

function Get-SP2016ProductKey {    
    $map="BCDFGHJKMPQRTVWXY2346789"
    $value = (get-itemproperty "HKLM:\SOFTWARE\Microsoft\Office\16.0\Registration\{90160000-110D-0000-1000-0000000FF1CE}").digitalproductid[0x34..0x42]  
    $ProductKey = "" 
    for ($i = 24; $i -ge 0; $i--) { 
        $r = 0 
        for ($j = 14; $j -ge 0; $j--) { 
            $r = ($r * 256) -bxor $value[$j] 
            $value[$j] = [math]::Floor([double]($r/24)) 
            $r = $r % 24 
        } 
        $ProductKey = $map[$r] + $ProductKey
        if (($i % 5) -eq 0 -and $i -ne 0) { 
            $ProductKey = "-" + $ProductKey
        } 
    } 
    $ProductKey
} 
Get-SP2016ProductKey  

Thanks & Regards,

sharath aluri


Friday, July 12, 2019 8:38 PM

Hi Sherazad,

Got to below Url to get the Product Key:

http://CentralAdmin_Url/_admin/Conversion.aspx

Below article for couple of ways to get the key:

http://www.sharepointdiary.com/2013/07/recover-sharepoint-2007-2010-product-key.html#ixzz2adRukrTR

Thanks & Regards,

sharath aluri


Monday, July 15, 2019 8:47 AM

Hi Sherazad,

If a reply helps you, please remember to mark it as an answer.

Thanks for your understanding. 

Best Regards, 

Lisa Chen

Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].

SharePoint Server 2019 has been released, you can click

here to download it.
Click

here to learn new features. Visit the dedicated

forum to share, explore and talk to experts about SharePoint Server 2019.


Monday, July 15, 2019 1:36 PM

Hi Sharath,

Thank you for the respone. This is what I get when I load the URL. The version of SharePoint I have is 2016. Do you happen to have the powershell for that version?

Sherazad


Monday, July 15, 2019 6:50 PM

Hi Sharath,

That worked. Thank you very much.

regards,

Sherazad

Sherazad