I have a custom list where users submit there request for new site, which stores, information such as Site Name, Site url, template type, Size of the site, Site Owners etc.

Can I use powershell script to capture that data and provision sites based off that?

If that can be done, can you please lead me to the right direction on where to start? I am a novice Powershell User and SharePoint Administrator.

  • How does a user know the size of the site before a site is provisioned? Is this custom list only used for requesting new sites, or does it also satisfy some other business requirement? – Jeff Freeman Sep 24 '14 at 16:08
  • We have Quota template set up for the sites for diffrent site types in central admin. I have a Choice Column Set up for users to select three diffrent sizes in the list, which tallies up with the quota size i have available. – allegro octopus Sep 24 '14 at 16:18
  • I don't think you can enforce a disk quota on a website (SPWeb) as it's a setting you set on a site collection (SPSite). Please look here as a reference. – Jeff Freeman Sep 24 '14 at 16:32
  • We have been doing that for some time now using central admin site creation page. Question is can this be done using powershell? – allegro octopus Sep 24 '14 at 17:26

To read the items from list :

$sourceWebURL = "http://sharepointsite"
$sourceListName = "mylist"

$spSourceWeb = Get-SPWeb $sourceWebURL
$spSourceList = $spSourceWeb.Lists[$sourceListName]
$spSourceItems = $spSourceList.GetItems()

$spSourceItems | ForEach-Object {
    Write-Host $_['ID']
    Write-Host $_['Title']

To create Site with:

New-SPWeb http://somesite/subweb1 -Template "STS#0"



  • $_["Column Name"] will work for a lot of the fields, but some (like Choice or User or Group) fields will require a little more. Here's a link to help out with that. – Jeff Freeman Sep 24 '14 at 16:25
  • can i pass $sourceWebURL inside -url property of New-Spweb -url $sourceWebURL as such – allegro octopus Sep 25 '14 at 21:05
  • Yes you can use variables. – Aanchal Sep 26 '14 at 3:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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