Wednesday, June 24, 2015

Copy-SPSite: Rename/Recreate SharePoint site collection

Most of my clients had a requirement to rename SharePoint site collection in all SharePoint versions including SharePoint 200, 2010 and 2013. To do that we have to take the existing site collection backup, Delete the site collection and Restore it new site collection. If anything happens in this process, we are gone. Nothing left.

But in SharePoint 2013 we got new command, Copy-SPSite command allows us to copy the site collection. This option allows us to duplicate the site collection to new site collection. We have options to specify the destination DB.

Here is the syntax for Copy-SPSite command,

Copy-SPSite Source Site URL [-DestinationDatabase Destination DB] -TargetUrl Target Site URL

We can use this command to copy the site collection in same content DB. Copy-SPSite command will not work for copy the site collection in other content databases. To do this we have to follow backup and restore process.

We can copy host named site collections using Copy-SPSite command.

Copy-SPSite -Identity Source Host Named Site collection URL -TargetUrl Destination Host Named Site collection URL -HostHeaderWebApplication Host Header web application URL

Before that we need to run Remove-SPSiteUrl command as below.


Remove-SPSiteURL -URL Host named Site collection URL

Share this

6 Responses to "Copy-SPSite: Rename/Recreate SharePoint site collection"

  1. https://www.carda.co.in/

    https://www.carda.co.in/buyonline-wedding-cards

    https://www.carda.co.in/buyonline-birthday-cards

    ReplyDelete
  2. Order beautiful and unique kids birthday cards, baby shower cards and birth announcement cards from CARDA at https://www.carda.co.in/

    ReplyDelete
  3. Purchase Online grocery with in 2 hours in Gurgaon @ our online store www.spicenpulses.com

    ReplyDelete
  4. Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us.


    Base SAS Training in Chennai

    ReplyDelete
  5. Your content is awesome . You have done a great job and its very useful for me . I appreciate your effort and I hope that you will get more positive comments from the web users.
    Branding Services in Chennai

    ReplyDelete

  6. That is very interesting; you are a very skilled blogger. I have shared your website in my social networks..!

    Digital Marketing Services in Chennai

    Digital Marketing Company in Chennai

    ReplyDelete