Make a Copy of a SharePoint Site (for testing)

The other day I wanted to test out something in SharePoint 2016, but I didn't have a test environment.But I also didn't want to test it out in production. So what do I do? I needed to make a copy of my SharePoint site into another site collection.

Here is what I did:

1) Create a new site collection in Central Admin
2) Delete the site from the site collection

3) RDP to the SharePoint Server
4) Open up PowerShell ISE
5) Copy and run this command:

# imports SharePoint powershell
if ( (Get-PSSnapin -Name "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null )
    Add-PsSnapin "Microsoft.SharePoint.PowerShell"
#copy web
Copy-SPSite -DestinationDatabase WSS_Content -TargetUrl

You will need to change the site source, destination, and database name when you run this command.


Share on Google Plus

About Tom DeMeulenaere

Highly accomplished information technology professional with extensive knowledge in System Center Configuration Manager, Windows Server, SharePoint, and Office 365.
    Blogger Comment


Post a Comment

Note: Only a member of this blog may post a comment.