In my powershell script, I get all lists, then loop through and filter based on if its a document library and if its a certain content type, but I want to do this through CAML.
This is the loop logic
# get all the lists from the source location
$sourceLists = $sourceWebObj.Lists;
# loop through all lists
foreach ($sourceList in $sourceLists) {
# check if it's a valid document library and it's content type is what we want
if($sourceList.BaseType -eq "DocumentLibrary" -and $sourceList.ContentTypes[$DocLibContentType] -ne $null) {
}
}
How can I do the same thing with CAML?
Thanks