How to create wiki page library in SharePoint using PowerShell


 
    $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()