One of the best new features of SharePoint 2010 is the ability to manage most aspects of SharePoint with PowerShell. A good example of this is creating new lists on sites.
To create a new list you’ll first have to figure out how to tell SharePoint which template to use. Here’s how you can show all template possibilities:
$SPAssignment = Start-SPAssignment </p><p>$SPWeb = Get-SPWeb http://localhost -AssignmentCollection $spAssignment </p><p>$SPWeb.ListTemplates | Select Name, Description
You can use any of the templates returned on that site. To create a list you can use the Add() method:
$SPTemplate = $SPWeb.ListTemplates["Custom List"] </p><p>$SPWeb.Lists.Add("List Title","Description",$SPTemplate)
If you want to perform a different action on a list please use
$SPWeb.Lists | Get-Member
to find out what command to use.
To dispose of all the objects that have been called, just run