I’m working on my PowerShell for SharePoint 2013 (SPC195) talk for SPC12 and I find this new cmdlet so useful I thought I would share it immediately. The cmdlet is Copy-SPSite and it’s easy to use. Just run it and before you know it, you’ll have a duplicate of a site collection on a fresh new URL. You can even optionally specify a new content database. Here is what it looks like:
Copy-SPSite http://server/sitecollection –DestinationDatabase MyContentDb –TargetUrl http://server/sitecollection2
A successful execution will return nothing at the command prompt. This is a great cmdlet for developers and IT pros that often need to quickly clone site collections and tear them down. It will take longer for bigger site collections of course. Try it out today.