I have a UAT SharePoint Farm. I would like to recreate the structure of a Production Farm into the UAT Farm i.e. Web Application, Site Collection, Sites, Document Libraries.

Does anybody have a PowerShell script written that takes a URL of a SharePoint Web Application and recreates the structure into another Farm without content?

1 Answer 1


It is difficult to create a farm structure just based on a URL of a SharePoint web application by PowerShell script.

I suggest you could back up the farm with content and restore it in another environment. And you could clear the content in the new farm.

If you back up the farm without content, then it will just back up the configuration of the farm. Then there is no list, library, subsite or other objects. And we cannot get the structure of the farm.

More references:

Back up farms in SharePoint 2013.


Restore farms in SharePoint 2013.


  • Why so? It’s equally as difficult to “clear down” content as that likely has to be scripted also for a large farm. There’s also potential issues with recycle bins when deleting content from a restored Farm with large content databases. There’s probably more work in the restore & delete method than a constructive script that looks at another Farm & copies the structure only to CSV & recreates it elsewhere. The question is only to find out if somebody else has scripted similar previously. Nov 15, 2017 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.