I want to make some changes to all of the document libraries in a site collection, but not make changes to any other lists. In PowerShell, how can I check whether a list is a document library, or a different kind of list?
To see the all the lists in a site, and if they are a document library or not, this PowerShell script should be helpful:
I ran this on one of my sites, and it returned a mix of "GenericList" and "DocumentLibrary" as the BaseType property.
You can also look at the property $list.BaseTemplate along with $BaseType to narrow down the number of system generated document libraries that are returned.
Assuming you have instance of SPList in powershell, the BaseType of list would be SPBaseType.DocumentLibrary for list of type document library.
So that check may look like