iterate through all sites and list
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$spSite = New-Object Microsoft.SharePoint.SPSite("http://url")
$webApp = $spSite.WebApplication
foreach ($site in $webApp.Sites) {
foreach ($web in $site.AllWebs) {
foreach ($list in $web.lists) {
if ($list.fields["Custom Field name"]) {
"List has custom field" | Out-File C:\filePath\log.txt -append
}
}
}
}
No comments:
Post a Comment