Automating Creation of Web Applications and Site Collections

Administrators benefit from PowerShell when they need to create a number of site collections. This can often happen when administrating large SharePoint farms or providing hosting services.

Site collection creation operations consist of three steps:

  1. Create an IIS web application and application pool.
  2. Create a site collection.
  3. Choose a template for the site collection.

These operations can be performed via central administration or easily automated via PowerShell. The following example combines all three steps as a single cmdlet:

image

To execute this function, type the following into the ...

Get Microsoft SharePoint 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.