I need to list all lists that use a lookup column within an spweb, and, if possible, list those lookup columns. Anybody have a script?
I found http://techtrainingnotes.blogspot.com/2015/04/powershell-finding-all-sharepoint-lists.html
This returns everything in the farm, I want to limit to a single spweb. Maybe switch Get-SPWeb from -Limit All to to -Identityhttp://server/subsite/?
$TTNExcludeLists = "Solution Gallery",
"Workflow Tasks",
"Master Page Gallery"
Get-SPSite -Limit All | Get-SPWeb -Limit All |
Select -ExpandProperty Lists |
Where { -Not ($TTNExcludeLists -Contains $_.Title) } |
Select -ExpandProperty Fields |
Where { $_.TypeDisplayName -eq "Lookup" -and
$_.Hidden -eq $false -and
$_.FromBaseType -eq $false } |
Select {$_.ParentList.ParentWebUrl},
{$_.ParentList},
Title
Thanks.










