The data is what I needed but I have 1 question. The script works fine with 1 of my vcenters that has about 150 VM's but on another vcenter which has 700 I get the following error if I change the addminutes to anything more than a day.
Get-VIEvent | The operation has timed out |
At :line:10 char:11
+ Get-VIEvent <<<< -MaxSamples ([int]::MaxValue) -Start $start | where {($_ -is "VMware.Vim.TaskEvent"-and "VirtualMachine.createSnapshot" -eq $_.Info.DescriptionId)} | Select CreatedTime,UserName,@{N="VM";E={$_.Vm.Name}},FullFormattedMessage | export-csv c:\Scripts\snaps.csv
I could run the report for a day at a time but that might take a while since I need 30 days.
Any help is greatly appreciated