in

Dot Net Mafia

Group site for developer blogs dealing with (usually) Ionic, .NET, SharePoint, Office 365, Mobile Development, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog

Syndication

Archives

Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for Ionic, SharePoint, and Office 365.

Copying Site Collections with PowerShell in SharePoint 2013 Preview

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.

Comments

 

Tom Resing said:

Nice to see they are adding useful cmdlets. Now, how to remember them all with typing help all the time?

October 22, 2012 9:08 AM
 

Osama shatnawi said:

Thanks

December 31, 2012 2:00 AM
 

Nick DeAngelo said:

Thank you - you are a life-saver!

June 5, 2014 6:47 AM
 

Jon Sommervold said:

Thanks a lot Corey!

Do you know if there is an equivalent to this cmdlet in the client side object model (csom)??

...or if there are plans for this in the not so distant future?

September 24, 2014 8:41 AM

Leave a Comment

(required)  
(optional)
(required)  
Add

About CoreyRoth

Corey Roth is an independent SharePoint consultant specializing in ECM, Apps, and Search.
2018 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems