You can't increase the windowsize, that is indeed maxmum 1000 entries.
But you have a small error in the RewindCollector call (you forgot the parenthesis) which made it be possitioned on the last 'page'.
Try like this$DateStart = (Get-Date).AddDays(-300)
$TaskNumber = 1000
$TaskMgr = Get-view TaskManager
$tFilter = New-Object VMware.Vim.TaskFilterSpec
$tFilter.Time = New-Object VMware.Vim.TaskFilterSpecByTime
$tFilter.Time.beginTime = $DateStart
$tFilter.Time.timeType = "startedTime"
$tCollector = Get-View ($taskMgr.CreateCollectorForTasks($tFilter))
$Tasks = $tCollector.ReadNextTasks($TaskNumber)
}until($Tasks.Count -eq 0)
$tCollector.DestroyCollector()Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
Ah, many thanks!
So you have to run the ReadNextTasks($TaskNumber) method against the Collector over and over, reading 1000 (or whatever number you specify) at a time.
I put it in my script. Working great now.
Indeed, the window slides over the tasks by each call to ReadNextTasks.
The size of the window is max 1000 entries.Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz