How To Get The Lists With Content Type Enabled Or Disabled Using PnP PowerShell

In this blog, we are going to see how to get the lists/libraries with content type enabled or disabled using PnP PowerShell.

All Lists & Libraries with ContentType property 

The below PowerShell command is used to retrieve and print the AllowContentTypes property for all the lists and libraries from the SharePoint site. 
  1. PS:> $cred = Get-Credential        
  2. PS:> Connect-PnPOnline -Url https://<tenant>.sharepoint.com/sites/dev -Credential $cred        
  3. PS:> Get-PnPList | Select-Object Title, AllowContentTypes  
 
 
Lists with ContentTypes Disabled 

The below PowerShell command is used to retrieve the Lists with ContentTypes disabled for the SharePoint site.  
  1. PS:> $cred = Get-Credential        
  2. PS:> Connect-PnPOnline -Url https://<tenant>.sharepoint.com/sites/dev -Credential $cred        
  3. PS:> Get-PnPList | Select-Object Title, AllowContentTypes | Where-Object { $_.AllowContentTypes -Eq $false }  
 
Lists with ContentTypes Enabled

The below PowerShell command is used to retrieve the lists and libraries with ContentTypes enabled for the SharePoint site. 
  1. PS:> $cred = Get-Credential        
  2. PS:> Connect-PnPOnline -Url https://<tenant>.sharepoint.com/sites/dev -Credential $cred        
  3. PS:> Get-PnPList | Select-Object Title, AllowContentTypes | Where-Object { $_.AllowContentTypes -Eq $true }  
Ebook Download
View all
Learn
View all