To achieve this we will pass a CSV file to the PowerShell script. The CSV file has the data in the following format:
Url Owner Language Template
http://localhost/sites/demo1 domain\administrator 1033 STS#0
http://localhost/sites/demo2 domain\administrator 1033 STS#0
http://localhost/sites/demo3 domain\administrator 1033 STS#0
lets store this file in C: drive and then I will import this CSV file using the PowerShell command. Now we can execute a PowerShell script which will create bulk SharePoint sites based on the data in the CSV file.
$csvfile='c:\BulkSiteCreation.csv'
import-csv $csvfile | where {new-spsite -Url $_.Url -OwnerAlias $_.Owner -Language $_.Language -Template $_.Template}
1 comment:
Today, I tried with your script on MOSS 2007 on my sharepoint server. The error return as saying "spsite" syntax is not valid. your suggestion would be much appreciated.
Post a Comment