$listName="Wiki"
$description="My Wiki Library"
$template="Wiki Page Library"
$siteURL="http://serverName:1111/"
$site=Get-SPSite $siteURL
$web=$site.RootWeb
$listColl=$web.Lists.TryGetList($listName)
if($listColl -eq $null)
{
$templateType=$web.ListTemplates[$template]
[Guid]$listId = New-Object Guid
$listId=$web.Lists.Add($listName,$description,$templateType)
$list=$web.Lists[$listId]
$list.OnQuickLaunch = $true
$list.Update()
write-host -f green $listName "is created successfully"
}
else
{
write-host -f yellow $listName " already exists in the site"
}
$web.Dispose()
$site.Dispose()
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Krys DragonPosted Mar 21, 2013, 6:16 AM
Simpler than any Visual Studio Project with WSP! Well Done !