Get All Lists Using PnP PowerShell In SharePoint

Introduction


In this blog, we will learn how to get PnP PowerShell operation on-site collection lists/libraries. Also to get all unhidden lists/libraries using PnP PowerShell. 
 
Connect to SharePoint Online site using below command,
 
$siteUrl = "<<your site collection>>"
$site = Connect-PnPOnline -Url $siteUrl -UseWebLogin
 
After connecting the SharePoint site. Run Get-PnPList command as shown below,
 
Result
 
Get All Lists Using PnP PowerShell In SharePoint 
Returns all lists/libraries including hidden lists from the SharePoint site collection 
 
Get all Lists that are not hidden using the Where object we can filter results by condition to return filtered data.
 
Get-PnPList | Where {$_.Hidden -eq $false}
 
Result
 
Get All Lists Using PnP PowerShell In SharePoint
Returns all lists/libraries excluding hidden lists from the SharePoint site collection
 

Conclusion

 
The above code snippet will return all lists/libraries including hidden lists. 
 
Thanks for reading this article.
 
Please do like and follow!