Rename Site Collection

$site = Get-SPSite http://mysite/sites/marketing
$site.Rename(„http://mysite/sites/sales“)

You can only use this to rename site collection URL’s that
– Use “Wildcard inclusion” Managed Paths.
– Are Host named site collections (In which case you could also use Set-SPSiteURL)

After the IISReset cmdlet is run, it may still take a small while for the new site’s URL to work as expected.

$site.RecycleBin.DeleteAll()


Empty the recycle bin of site collection first!!