Recover SharePoint 2013 installation key

I was reinstalling SharePoint 2013 Server in the lab tonight and discovered that I didn’t have the original license key that it was installed with. Googled online and found a number of Powershell scripts that claim to recover the key from the registry, but none of them worked – except this one, which was originally posted as a comment by KEMiCZA here. I can confirm that it worked for me.

This one should work SP-2013
function Get-SP2013ProductKey {
$map=”BCDFGHJKMPQRTVWXY2346789″
$value = (get-itemproperty “HKLM:\SOFTWARE\Microsoft\Office\15.0\Registration{90150000-110D-0000-1000-0000000FF1CE}”).digitalproductid
$baseAddress = 808
$needsN = ($value[$baseAddress + 14] -shl 3) -and 1;
$ProductKey = “”
for ($i = 24; $i -ge 0; $i–) {
$r = 0
for ($j = 13; $j -ge 0; $j–) {
$test = $value[$baseAddress + $j]
$r = ($r * 256) -bxor $value[$baseAddress + $j]
$floor = [math]::Floor(double)
$value[$baseAddress + $j] = $floor
$r = $r % 24
}
$ProductKey = $map[$r] + $ProductKey
}
if($needsN)
{
$firstLetterIndex = 0
for ($i = 0; $i -lt $ProductKey.Length; $i++) {
if($ProductKey[0] -eq $map[$i])
{
$firstLetterIndex = $i
break
}
}
$ProductKeyWithN = $ProductKey = $ProductKey.substring(1) # Remove first character
$ProductKeyWithN = $ProductKeyWithN.SubString(0, $firstLetterIndex) + “N” + $ProductKeyWithN.SubString($firstLetterIndex)
$ProductKeyWithN = $ProductKeyWithN.SubString(0, 5) + “-” + $ProductKeyWithN.SubString(5, 5) + “-” + $ProductKeyWithN.SubString(10, 5) + “-” + $ProductKeyWithN.SubString(15, 5) + “-” + $ProductKeyWithN.SubString(20, 5)
}
$ProductKeyWithN
}
Get-SP2013ProductKey

SharePoint 2013 Hidden User List

<sitecollectionurl>/_layouts/15/people.aspx?MembershipGroupId=0

Powershell script to export BDC models from SharePoint

This Powershell script exports Business Data Connectivity (BDC) service models from SharePoint.

# Get list of of all bdc models

$bdcs = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType “Model” -Name * -ServiceContext http://sharepoint

foreach($bdc in $bdcs)
{

# create a unique file name using the bdc name

$path = “.\$($bdc.DefaultDisplayName).bdcm”

# fetch the BDC object

$Model = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType “Model” -Name $bdc.DefaultDisplayName -ServiceContext http://sharepoint
Export-SPBusinessDataCatalogModel -Force -Identity $Model -Path $path

}

This script was developed by Dhejo Prothasis, Lead Architect at Acquiresoft Solutions.

Animated Title Banner in SharePoint Modern site

Mimic the look of a slide show or rotating banner on your SharePoint site with an animated gif!

Hello there! This is Danielle Lissak invading my friend The SharePoint Nomad’s blog to share some SharePoint tricks with ya.  We recently had a client that really wanted a sort of slideshow in the header block of their corporate portal page.  I was unable to find a way to do this within the features currently offered on the SharePoint modern site so I was left to my own devices.  Here’s how I managed to mimic the look of a slideshow or rotating banner on the client’s site with an animated gif.

I’m not going to go into how to create an animated gif since this is a SharePoint blog, but there are many programs out there to do so.  I used PowerPoint to create this one because I already had it and I’m cheap. 

Mimic the look of a slide show or rotating banner on your SharePoint site with an animated gif!

Depending on how you want it to appear, you may need to size your gif so that it fits the space at 100% scale.  This way, you can control the height of the banner and minimize stretching/zooming. 

Once you have your gif you can add it to your SharePoint page just as you would any other image.  However, adding it to the banner block the standard way may cut off a part of your image as shown below.  And although you can’t tell here, it is animated!

Mimic the look of a slide show or rotating banner on your SharePoint site with an animated gif!

This may work well for your project but in this case, it did not suit my client’s needs. 

The work around is to delete the existing webpart.  In the case of the Communications templates, delete the Hero webpart to get the menu shown below.  Then just choose the Image option and proceed to insert the image as you normally would.

Mimic the look of a slide show or rotating banner on your SharePoint site with an animated gif!

Now pat yourself on the back because you’re done! 

Mimic the look of a slide show or rotating banner on your SharePoint site with an animated gif!

Did I miss something? Let me know in the comments and I’ll add it in! 

Keep on keepin’ on,

Danielle Lissak

SQL Server 2012 Service Pack install fail

Problem description

Installing SQL Server 2012 Service Pack 3 update, and ran into the following problem:

The install package extracts setup files, flashes a command window, and disappears.  Nothing appears to be installed.  I tried running the package in elevated administrator mode and with the /action=Patch switch – no luck. SQL Server setup log Summary.txt contained no entries at all.

Windows Application event log showed some warnings such as the screenshot below:

NETerror

(.NET Runtime version 2.0.50727.5485 – Error ‘Invalid syntax on line 166’)

Solution

This problem was fixed by running the following command:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\caspol.exe    

-machine   -reset

If you’re using 64-bit framework, run the following command:

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\caspol.exe  

-machine -reset

 

No system reboot was required in my case.

Some thoughts about OneNote…

I am an avid OneNote user.  I’ve been using Microsoft OneNote for several years, and it’s a must-have application for me.  It helps me stay organized amid the chaos of competing priorities, fast-moving projects, and a busy family.   In the meantime Microsoft has been making serious investments into OneNote, making it available across several mobile platforms and integrating it with OneDrive and SharePoint Online.  The OneNote user experience is now quite smooth between mobile and desktop, and the value proposition for OneNote has never been greater.

At the same time, when I look around I see that many individuals and organizations have access to OneNote (it comes preinstalled with several flavors of Microsoft Office and the mobile app is free).   However, they’re not using it to capture notes or organize their information.  They’re not using a competing product, either.  For most people, pen & paper is still the preferred method for taking notes.  Information arriving electronically is captured in email or in folders or documents which makes it difficult to find information and keep it updated.  For many people, things that they know or want to keep are spread across multiple sources and repositories, and it takes a lot of mental effort to find and retrieve information.  Old habits die hard, I suppose…

Our mission here at ITKM Systems is to help our clients capture and organize their informal knowledge assets.  OneNote provides a great platform for accomplishing this goal.  Over the next few months, you will see some new content on this blog related to how to leverage OneNote for best results and achieve maximum productivity. We will be spending more time with OneNote, figuring out the best layouts, the best templates and the best ways to capture, organize, and retrieve your knowledge.

SharePoint Powershell Move-SPSite error: Invalid object name

Attempting to move a SharePoint site using Powershell cmdlet Move-SPSite and getting the following error:

Invalid object name ‘WSS_Content.dbo.AllSites’.

This error occurs because the database schema between the source database and the target database is different.  In my case, the source database was hosted on SQL Server 2008 R2, and the destination database was on SQL Server 2012 SP3.  I solved the problem as follows:

  1. Create a new content database on the source SQL Server.
  2. Use Move-SPSite cmdlet to move your SharePoint site into the new DB.
  3. Using SQL Server Management Studio, back up the new content DB to a file and copy it to the destination SQL Server.
  4. Restore the database on the destination SQL Server.Move-SPSite

RSS Information Week Headlines

  • An error has occurred; the feed is probably down. Try again later.

RSS SharePoint Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS InfoPath Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Joel Oleson Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Bud Ratliff blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Susan Hanley’s KM Blog

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 381,244 hits