Sunday, October 16, 2016

Install SharePoint 2013 with Product key that has number of allowed installation exceeded--SharePoint 2013-AutoSPInstaller product bug(not recommended)

Note-: Please try this at your own risk. this is no means to promote piracy. I hope Microsoft fixes this bug with future patches/installation media.

Recently I had a situation where in customer had already initiated purchase of SharePoint license key as the number of installations had exceeded the number of permitted installation with the existing product key. if we try to use this key in SharePoint installation wizard, it will promptly give us an error message stating the key is invalid. since number of valid/allowed installations is already over.

I normally use AutoSPInstallater for SharePoint installation as I prefer having meaningful database names and also having one single script to install and provision sharePoint services.

So here come the bug part. I used this license key in AutoSPinstaller and SharePoint does not complains about it and proceeds with installation and provisioning of service application.

No issues detected while running sharepoint. After few days we got a new valid product key and we replaced it in farm.

Always please use genuine products as product developers deserve to be paid for hard work which has gone into making these softwares.

This article is just to highlight the product bug which I discovered in SharePoint 2013 and I hope MS will improve SharePoint by fixing this.

Restore Site collection backup from Lower to Higher SharePoint CU version 2013 and vice versa

Recently I had faced an issue where QA and test were on May 16 CU where as Prod was on March 15 CU. With SharePoint 2013, it does not allows to restore site collection backups if both source and destination farms have different SharePoint version like in above case and we will get error when use Restore-SPSite command.

There are two way to solve this issue....

1) Database copy approach 

This approach is pretty simple. you need to take backup of database having site collection you want to restore and restore database in destination SQL server. Mount database with desired web application and upgrade database using powershell.

2) Hack site collection backup file

  • Backup your site collection from Source farm using Backup-SPSite command.
  • Download HXD editor for editing backup file which is in hexadecimal format.
  • Post installing HXD, Run it.
  • Open site collection backup file in above tool
  • Site collection backup file should look something like below...
  • image
  • If we try to find the version, which we got from error message from the log, we will find that it is located in the beginning of the file
  • best things about backup file version is that version is stored only once and that too at beginning of file.
  • change source version to the target in the hex editor now.
  • image
  • If you unsure about target SharePoint version, you can get from central admin-->Upgrade and Migration-->Check product and patch installation status
  • Or you can take site collection backup of any blank site in destination farm and open with HXD to get SP version number.
  • Once source SP version is replaced with destination SP version save the backup file in HXD.
  • Run the Restore-SPSite command again and site collection would be restored without any issues.