I am trying to iterate over each item in specific view for a list in SharePoint 2010.
What i have so far works to return items in the view, but only the items in the first paginated view for that set. So even though all Documents contains 11K items i only get 30 returned to me.
I found this question and it was answered, but the code there doesnt work for me: Powershell Script to get items only in a particular view of SharePoint List/library
Here is what i am trying:
$web = Get-SPWeb http://myweb
$list = $web.Lists["MyList"]
$view = $list.Views["MyViewName"]
$items = $list.GetItems($view)
$cntItems = 0
foreach($item in $items)
{
$cntItems++
}
write-host $cntItems
The above returns 30
since that is what the view has as its page item limit.
30
Is there some setting or some other way to do what i am trying to do?
Any help is appreciated.