Wednesday, August 14, 2013

PowerShell Script to mount and Upgrade all site collections in a web application

Sometimes, the visual upgrade gets a bit buggy so use this instead and have no issues. Make sure you export all the solutions from the old central admin and add them and deploy them to the new Sharepoint 2013 environment. This way you will not have issues with the webparts and pages.

Add-PSSnapin Microsoft.SharePoint.Powershell
Mount-SPContentDatabase CSIHQ_Content -WebApplication http://server.com -AssignNewDatabaseId -DatabaseServer Dbservername
$SPwebApp = Get-SPWebApplication "http://server.com"
foreach ($SPsite in $SPwebApp.Sites) { Upgrade-SPSite $SPsite.Url -VersionUPGrade write-host $SPsite.url }

No comments:

Post a Comment