I need to fill up 2.4 TB of space. I need to generate thousands of personal sites and hundreds of team sites. I have the scripts to populate an existing site, but I've ran into problems.

  • How can you script the screation of a personal site?
  • Is it possible to make a backup, then use Restore-SPSite in some fashion that accounts for the fact that sharepoint only allows the site guid in the backup to be used once per content database?
  • Are there any other strategies for populating data?

1 Answer 1


You could use SPDeploy from Codeplex (of which I'm a contributor).


You supply an XML file (there samples included, as well as full XSD so you can get intellisense when building your XML), and SPDeploy will create the structure.

You want to create hundreds of teamsites though, so you'd have to create hundreds of lines of XML for it to provision the sites (and the SPDeploy process itself will certainly take a few hours to do this).

So another option is to create a simple command line application that creates site collections and subsites using something unique for the titles and urls (a text concatenating the current time or something) all inside a couple of for loops.

For generating content, there is the ImTech TExt Content Generator - http://imtech.codeplex.com/releases/view/8877- but that is done through the UI and you'd need to connect to each site in turn and generate the data.

Another option for that is just another method in a console app which is creating the sites, which creates a couple of lists and throws in a few thousand rows.

For your initial problem of creating MySites, you'd first need thousands of users in AD* (plenty of scripts on the web for doing this), then use the UserProfile Manager to get the UserProfile object for each user in AD, and call CreatePersonalSite() for each profile.

*Someone confirm for me if you do actually need to do this.

  • *For My Sites, hopefully I can use local accounts on a computer in our production domain. Our AD team won't be too happy about creating 19,000 accounts for testing purposes.
    – jimmarq
    Commented Jun 2, 2011 at 20:11
  • Ah, I thought you had a separate forest for this environment. If you have thousands of accounts already, you can just use the user profile service to serve against those accounts then and create personal sites for each. I'm thinking, after writing all that above, that a console app might be the best way (until someone comes along and slaps me with a Powershell Script).
    – James Love
    Commented Jun 2, 2011 at 20:13

Your Answer

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

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