Move Site Collection to Another Content Database using PowerShell

Requirement: Found a SharePoint Site collection growing in size over a period of time and wanted to move the SharePoint 2013 site collection to another content database.


Use the PowerShell Cmdlet Move-SPSite to move site collection from one content database to another. Here is how: First, identify the target content database to move your site collection. You can create a new content database with the New-SPContentDatabase cmdlet.

Next, Run the Move-SPSite cmdlet with site collection URL and database name parameters.


Move-SPSite <Site-Collection-URL> -DestinationDatabase "<Database-Name>"


Move-SPSite "" -DestinationDatabase "SP13_Intranet_Content08"

Here is our script in action:

move site collection to another content database sharepoint using powershell
Tips: To find the current database of the site collection, use: Get-SPSite “Site-collection-url” | Select ContentDatabase

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. Passionate about sharing the deep technical knowledge and experience to help others, through the real-world articles!

3 thoughts on “Move Site Collection to Another Content Database using PowerShell

  • Hi,

    Move-SPsite command throws Execution Timeout error after 3 hours in production. Source site size is 65 GB and when tested in test server move-spsite works perfectly fine. Not sure what’s causing this issue of timeout. Please advise.

    • Even I experienced this for large sites, So I ended up site backup-restore to new database!

  • Hi,
    While moving we are getting timeout error site with size 130 GB and above, what can be done over here?
    How to avoid timeout error, We tried web.config solution but didn’t work fr us.

    Please suggest.


Leave a Reply

Your email address will not be published. Required fields are marked *