Monday, January 21, 2013

Method for migrating or upgrading Sharepoint 2010 to 2013.

On new server
  1. Create new Web Application
    1. Use the same exact websitename as the original site.
    2. Use the sameport as orginal site.
    3. Make sure the same authentication method is used. In Sharepoint 2013 the new default method is Claims Based Authentication which can cause problems.
        1. To deactivate Claims based Authentication using Powershell:
          /> $setcba = Get-SPWebApplication http://YourSiteURL
          />$setcba.UseClaimsAuthentication = 1;

    4. Make sure e-mail settings are configured
    5. Take care not to not configure any Site Collections for the new site. This will solve itself when old site is restored.
  2. On Original server
  3. Take backup of contentdatabas for the site using SQL Management Studio.
    1. The Databas can be set to Read-Only before taking backup to make sure no changes are made to database after backup. Users will still be able to access and read from site, but not change or upload.
  4. Copy contentdatabas to new server.
  5. On the new server
  6. Restore contentdatabas using SQL Management Studio
  7. Make sure Sharepoint Service account and the current user account (usually Sp_admin) has Databas Owner Permissions on the newly restored database.
  8. Verify that all required components are installed, like languagepacks and custom webparts etc.
    1. Run />test-spcontentdatabas –name yourcontentdatabase –webapplication http://yourwebsite:80 (sometimes, with many errors, it’s easier to read if piped to txt document by adding > myerrors.txt
    2. Identify and correct as many as possible. This can be difficult cause only application ID is shown for most features.
        1. To identify installed features it’s sometimes easier to compare the missing features to IDs found on the original sharepointsite.
          Using powershell:
          />get-spfeature –webapplication http://yourwebsite:80
          Or if you want a more complete list use good old stsadm
          /> stsadm –o enumallwebs –includefeatures > featurereport.txt

    3. This features might not be critical but you’ll know soon enough if you go forward without them. Trial and error is the way to go.
  9. Mount the contentdatabas to the webapplication
    1. />mount-spcontentdatabase –name yourcontentdatabas –databaseserver yourserver\sharepoint –webapplication http://yourwebsite:80
    2. Its optional to add: -upgradeuserexperience to above, but it’s usually advisable to check so everything works before upgrading through GUI instead.
    3. If for some reason mounting needs to be redone, you can use command below to verify that all been upgraded properly
    4. /> upgrade-spcontentdatabase –identity yourcontentdatabase
  10. Through Central Administration, make sure to verify that the Collection Admin for your website is something you can work with.
  11. You might also want to verify that all went as it should through Central Admin > Upgrade and Migration > Check Upgrade Status
  12. Test and see if your site is working as it should.
  13. Upgrade the visual experience to sharepoint 2013
- When restoring a site using SSL-certificate, don’t use the built in IIS 7.0 Certificate when testing out the site. Better to use a internal CA and distribute a correct cert. Otherwise things can’t get a bit funky.
- When restoring site using SSL-Certificate. If images seems to be missing from the website, try to deactivate the SSL function and see if it works better. Then activate SSL again. This worked for me for some reason. Though it might been an consequence from using the built in certificate in IIS7 and then switching.
- If the site looks funky after restore, give it a minute. I’ve had experiences when all looked wrecked and then 30min later all is fine. Might be a slow upstart of the Application Pool service or some accounts that need to be recreated.

Friday, January 18, 2013

Remove corrupt website from Sharepoint

I had an old website in our Sharepoint site that no one used since the dark ages. It has still followed me in all my upgrades from 3.0 to 2007 to 2010. But now with my 2013 upgrade it finally said no to me.

So to remove a site, which cannot be removed from the normal webgui administration in  sharepoint 2010? 

Use Powershell command below. It saves the day, now can I finally upgrade my bloody site?

/> Remove-spweb “


Display feature IDs in Sharepoint 2010

Powershell note.

/>get-spfeatures –webapplication

Nice feature when identifying missing features from Sharepoint migration or upgrade


Wednesday, January 16, 2013

Sharepoint 2013 and SQL Management Studio

Just installed Sharepoint Server 2013 in standalone mode. We need to migrate a sharepointsite to new environment. But for me to able to a attach-databaseupgrade I need to get into the SQL Server and do a restore of databases. Problem is, Management Studio wasn’t included with the Sharepoint SQL Expressinstallation. Unfortunatly the good old days of SQL Management Studio 2005 are now gone. Then, all I needed to do was download the management pack and install it. Then it was good to go. Not so now.
Firstly, there is no such nice standalone package. All I find to download are fully packaged solutions where basicly goes through the same tedious process you have to when installing SQL Server like you ordinary do, check all prereqs, install setuppackage, think a bit, check bla bla bla.
So I do this, choose add features to existing instance. Gets some error about “instance id required but missing” or even better when installing gets pass this point, instead there is no Management feature to found. What the #%¤  image
I just wanna restore a bloody database!
Fine, I get tired of this. Boot up a real SQL Management Studio from another server and tries to connect to sharepointinstance, but all to avail.
now I ready to punch things.
Back to searching for an answer. I briefly consider installing a proper SQL 2008 r2 standard instead, but no, I can’t give in now.
Finally I found something
When I instead choose New installed or add shared features in the installation package, I finally get the much sought after Management Tools – Basic option!image
Right, now be sure to uncheck Database Engine! Otherwise you’ll get a whole new instance dragging down your poor server.
Ok, so the solutions was pretty simple. Once you know where to go, but I did this is in a labenvironment and could be somewhat more casual about doing the new installationoption. In a production environment I usually tread more lightly. image
Anyway why must it be so unlogical Microsoft?
Searching the net for this issue gave me plenty of peers with the same issue so at least Im not the only dumbfounded out there.

Thursday, January 10, 2013

Sharepoint 2010 and Server 2012

This will show when trying to install the prerequsites:


Always a bad sign…followed by


Server 2012 and Sharepoint 2010 is not a supported configuration. Support will come with Sharepoint 2010 Service pack 2. For now, stick to 2008 R2.


Wednesday, January 09, 2013

Change Windows key

When deploying images with ghost or such as we somtimes manage to deploy an already activated windows computer. To change the key to a real oem if such is available run /> slui 3 and change the key.