Hi, I'm looking for retreiving the tasks events using powershell (the same informations you find using the vi client, Home, inventory, datastores, tasks and events tabs) to find the "delete" task (for exemple)
I would like to use the Get-Vievent command but I'm unable to use the -entity | get-datastore datastorename
I think the use of the datastore object not possible for the get-vievent command.
So i use :
Get-Vievent -MaxSamples 100000 | where-object {$_.FullFormattedmessage -match "delete"} | select CreatedTime, username, FullFormattedmessage | export-csv "c:\export_ds.csv" -noTypeInformation -UseCulture
It works but it's very slow (my environnement is very big)... and i reach the -maxsamples limitation.
Is there another way ? or I have to use -start -stop to limit the number of event and make several reports by month?
Thank you very much
thierry