Create custom SharePoint 2010 list using web service in Powershell

Steps Involved:

  1. Open SharePoint 2010 Management Shell by going to Start | All Programs | SharePoint | Microsoft SharePoint 2010 Products | SharePoint 2010 Management Shell (Run as Administrator).
  2. Run the following script.

Powershell Script:

 
[
String]$listName="Custom List"
[
String]$description="Custom List created using SharePoint web service in windows powershell"
[
int]$templateId=100
$uri
="http://serverName:10736/sites/ECT/_vti_bin/Lists.asmx?wsdl"
$listWebServiceReference
= New-WebServiceProxy -Uri $uri -UseDefaultCredential
$listWebServiceReference
.AddList($listName,$description,$templateId)
write-host
-ForegroundColor Green $listName " is created successfully"


For more information on New-WebServiceProxy please refer http://technet.microsoft.com/en-us/library/dd315258.aspx.