Created
May 22, 2020 19:33
-
-
Save BillCacy/60c38e6f10f5e236c3abed4aa1390982 to your computer and use it in GitHub Desktop.
Looks for all items with specified template name that have a value in the specified field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$root = gi master:// -id "{C557F52C-BDBA-4F3D-BAD0-E315AD39C9CB}" | |
$items = $root | ls -r | ?{$_.TemplateName -eq "<TEMPLATE NAME>"} | |
$fieldName = "<FIELD NAME>" | |
foreach($i in $items){ | |
if(-not([string]::IsNullOrWhitespace($i.Fields[$fieldName]))){ | |
$i.Name + " : " + $i.Fields[$fieldName].Value + " : " + $i.Paths.FullPath | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment