Frage

I have deployed a solution which creates a custom column/field to the entire web app.

But the solution doesn't contain any features.

Now I want to find the lists where that custom column is used. Please help me out.

War es hilfreich?

Lösung

I don't have a MOSS box handy but this should mostly get you there:

[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
            }
        }
    }
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit sharepoint.stackexchange
scroll top