how can I select only content items, items in content folder and Datasources of that items using PowerShell Extension script?
$items = @()
foreach($baseItem in $listOfPages) {
if($baseItem.Paths.IsContentItem){
$items += Get-Item $baseItem.Paths.FullPath
foreach($childItem in Get-ChildItem $baseItem.Paths.FullPath -Recurse) {
if($childItem.Paths.FullPath -contains 'Content'{
Write-Host "Child items is content "
$items += $childItem
}
}
}
/sitecore/content
or any folder under an item?