Friday, February 13, 2015

Powershell commands for upgrading a database from SharePoint 2010 to 2013

The commands for upgrading a database are pretty easy if you already have your 2013 farm setup. Just attach the 2010 content database to your 2013 SP SQL server and from a SharePoint management shell:

Test-SPContentDatabase -Name <DatabaseName> -WebApplication <WebApplication> -ServerInstance <SQL Server Name>
^Use above command to test your database for any errors

Mount-SPContentDatabase -Name <DatabaseName> -WebApplication <WebApplication>
^Above command performs the upgrade

If you are in claims based authentication in 2013 but not 2010, you'll need to upgrade the database to claims mode:
Convert-SPWebApplication -Identity <WebApplication> -To Claims -RetainPermissions

And if you need to convert the site to 2013 look and feel:

Get-SPSite <siteURL> | Upgrade-SPSite -VersionUpgrade

No comments:

Post a Comment