Are you sure the Tasks and Events are kept for sufficiently long ?
You can check with the vSphere Client.
Can you do a test ?
Create and remove a VM and then run the script for past day
$start = (Get-Date).AddDays(-1)
That should produce some results.