I was trying the below, but it trowed and error.
$datas = Get-Cluster -Name "xxxx" | Get-Datastore
foreach($ds in $datas){
$dview = $ds | Get-View
Get-VIEvent -Entity $dview | ? {$_.FullFormattedMessage -match "Lost Access"}
}
Get-VIEvent : 10/17/2016 10:25:04 AM Get-VIEvent Events can be retrieved only for inventory objects. The entity of type 'VMware.VimAutomation.ViCore.Impl.V1.DatastoreManagement.VmfsDatastoreImpl' will be ignored.
At line:1 char:1
+ Get-VIEvent -Entity $ds
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-VIEvent], InvalidArgument
+ FullyQualifiedErrorId : Core_GetEvent_DoWork_InvalidEntityType,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetEvent