Monday, May 1, 2017

How to get SharePoint 2013 Product key from current SharePoint 2013 Server

Open command prompt and run following script to retrieve your SharePoint product key from the SharePoint 2013 Server

function Get-SP-2013-ProductKey {

$map="BCDFGHJKMPQRTVWXY2346789"

$value = (get-itemproperty "HKLM:\SOFTWARE\Microsoft\Office\15.0\Registration\{90150000-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

}

#Call function

Get-SP-2013-ProductKey


 

Thank you very much

          Fahadullah Karimi

         SharePoint Specialist


How to get current SharePoint farm Passphrase Error: The tool was unable to download Microsoft SQL Server 2012 Native Client. Please check your Internet connection and try again. SharePoint 2016 Prerequisite installer.

2 comments: