Dienstag, 27. März 2012

Moving a SharePoint site Collection to another managed Path using PowerShell


I recently needed to move a Site Collection from one managed path to another. I found this blog using stsadm commands. I translated this to a PowerShell script: 


$fromUrl = "http://portal.dev/sites/TestSiteCollection"
$toUrl = "http:// portal.dev"

$backupPath = "c:\siteBackup"
Backup-SPSite $fromUrl -Path $backupPath -force
Remove-SPSite -Identity $fromUrl -Confirm:$false
Restore-SPSite -Identity $toUrl -Path $backupPath -Confirm:$false

Keine Kommentare:

Kommentar veröffentlichen