What is the difference between SPWeb and SPSite? I have this code using SPWeb
$web = Get-SPWeb http://mysite ForEach($list in $web.Lists) { if($list.BaseType -eq "DocumentLibrary") { Write-Host $list.Fields if($list.Fields.ContainsField("marking") -eq $true) { Write-Host "found" $list.Title } } } Which doesn't produce the right result, as apparently GPMS marking is not a column for a Document Library. But when I use this code using SPSite
Get-SPSite mysite | Select -ExpandProperty AllWebs | Select -ExpandProperty Lists | where {$_.GetType().Name -eq "SPDocumentLibrary"} | Select -ExpandProperty Fields | Select Title | out-file test.txt This has the so called marking column that I want to search for in the previous bit of code. Is there anyway of changing the previous bit of code so it does find the marking column?