SP2010 PowerShell - Create a wiki library and set the default welcome page
$web = get-spweb(http://myserver/sites/mysite)
$listTemplate = "WebPageLibrary"
$listDescription = "My Wiki"
$listName = "MyWiki"
$list_template = [System.Enum]::Parse([Microsoft.SharePoint.SPListTemplateType], $listTemplate)
$lists = $web.Lists
$lists.Add($listName, $listDescription, $list_Template)
$wiki = $web.GetList("/sites/mysite/" + $listName);
$rootFolder = $wiki.RootFolder
$rootFolder.WelcomePage = "MyHome.aspx"
$rootFolder.Update()
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment