Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

4 Answers 4

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
add comment

The STSADM operation CreateWeb creates subsites

share|improve this answer
add comment

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

http://technet.microsoft.com/en-us/library/cc262913.aspx

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.