PowerShell : SharePoint List not found in Site
SharePoint List not found in View All Site Collection
Request
We got a request to investigate an issue, 'Couldn't see the SharePoint List in the Site' - But we can access it with no issues.
Background
- We checked in SharePoint Manager 2010 - It's not hidden.
- We tried hiding it and revert the change but it's not showing up.
Solution
Nothing much to investigate - Root Cause is SP Admin tried to hide the list using SharePoint 2010 Manager and change committed as expected. So let's open the SharePoint shell management to get the foot print.
$web = Get-SPWeb 'http://domain.com/subsite' $list = $web.Lists $prop = $list['ListName'] #If return TRUE - The change is not properly Executed or SP 2010 Manager requires save and refresh $prop.Hidden #Double Check in SchemaXML $prop.SchemaXml #Enable Hidden to True $prop.Hidden = $true #Commit the Change $web.Update() #Cross verify #If return TRUE - The change is not properly Executed or SP 2010 Manager requires save and refresh $prop.Hidden #Double Check in SchemaXML $prop.SchemaXml |
Background
The given data is not correct - It's not a list, it's a document Library and this is deployed using custom solutions. After committing configuration changes redeploying the WSP will over ride it. So permanent fix is to redo the change in Custom Code.