Search This Blog

Monday, January 22, 2018

Upgrade Site SharePoint 2010 to SharePoint 2013

Step :1 Save the below script  UpgradeSite.PS1 and map the .bat file and execute run with admin
-----------------------------------------------start-----------------------------------------

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
{
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
$webApps = Get-SPWebApplication
foreach($webApp in $webApps)
{
$sites = $webApp.Sites
foreach($site in $sites)
{
Upgrade-SPSite $site.RootWeb.Url -VersionUpgrade -Unthrottled
$site.Dispose()
}
}


---------------------------------------end script----------------------------------------------------

Step bat file : Open notepad and Save UpgradeSite.bat below line
--------------------------------------------------------------------------------

cd /d %~dp0
powershell -noexit -file "UpgradeSite.PS1" "%CD%"
pause

No comments:

Post a Comment