Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
How can I perform a check if a document library already exists using Powershell in SharePoint 2010?
Something like this:
$w = get-spweb "<webURL>"
$list = $w.Lists.TryGetList("<Title of the list>")
if($list -ne $null)
# The list already exists
Replace <webURL> and <Title of the list> with your actual values
<Title of the list>
Required, but never shown