SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to create 300+ sub sites using the Team Site template in a SharePoint MOSS 2007 site collection. I have a list of names I want to basically use a script to create a site for each item. Can I do this with stsadm or does that only create site collections? I need an example script to look at. Does anyone know of one?

Thank you!

share|improve this question
up vote 0 down vote accepted

I have done this with the stsadm command as mentioned, but created all the scripts by copying all the sites needed into excel and using the Concatenate function to build out the command for all the sites. If you are a command line junky, the FOR command referencing your list of sites in a file could probably do this in one short line.

share|improve this answer

You could create a stsadm batch file to create them all.

share|improve this answer

The STSADM operation CreateWeb creates subsites

share|improve this answer

I would strongly urge you to consider not creating these as "sub sites" (aka Webs) and to consider creating them as Site Collections (aka Sites).

Reason being is that you won't be able to partition up your sub-webs into different Content DBs easily when they get big and unmanageable in one DB.

A whole Site Collection, including sub sites, can only live in one Content Database.

However, different Site Collections can live in different Content DBs ... which make them easier to manage long term as you can move them around more easily, have them on different SQL servers, backup/restore more flexibly etc...

  • your sql admin will like you more when you dont end up with on large content DB :)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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