Friday, May 3, 2013

Powershell - Create Posts list to Blog site in Sharepoint


[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

$site=new-Object Microsoft.SharePoint.SPSite("http://siteurl/sites/test/")

$web=$site.OpenWeb()

$SPTemplate = $web.ListTemplates["Posts"]


$web.Lists.Add("Posts","Description",$SPTemplate)

No comments:

Post a Comment