Posts

Showing posts from May, 2018

Errors While Importing Site Collection in SharePoint 2013/2010

Image
Actually we want delete some sub-sites from production. Which were create by custom template (Custom Site Template). We need to take all sub-sites backup separable. What we did, Just Exported one sub-site for testing purpose and trying imported on Staging farm. We faced below issues. Importing Sub-site: Import-SPWeb http://abc1:5555/Arabic/Dept/Depts/cc1 -Path "D:\cc1\cc1.cmp" -UpdateVersions Overwrite -force 1.      Import-SPWeb : Cannot find an SPWeb object with Id or Url : http://abc:5555/Arabic/depts/depts/cc1 Here problem clearly say, No Url found. Try to create new sub-site with Custom site template.Still facing problem try to reset IIS(iisreset) and create sub-site. 2.      Import-SPWeb: Cannot import site. The exported site is based on the template DEPARTMENTS#0 but the destination site is based on the template CMSPUBLISHING#0. You can import sites only into sites that are based on same template as the expor...

Deleting Multiple Sub-sites within Site using PowerShell

Deleting Multiple Sub-sites within Site using PowerShell. function RemoveSPWebRecursively(     [Microsoft.SharePoint.SPWeb] $web) {     Write-Debug "Removing site ($($web.Url))..."         $subwebs = $web.GetSubwebsForCurrentUser()         foreach($subweb in $subwebs)     {         RemoveSPWebRecursively($subweb)         $subweb.Dispose()     }         $DebugPreference = "SilentlyContinue"     Remove-SPWeb $web -Confirm:$false     $DebugPreference = "Continue" } $DebugPreference = "SilentlyContinue" $web = Get-SPWeb "http://dept-sp10-dev/Arabic/dept/dept/cdd" $DebugPreference = "Continue" If ($web -ne $null) {     RemoveSPWebRecursively $web     $web.Dispose() }