VMware Cloud Community
DecaffeinatedAd
Contributor
Contributor
Jump to solution

Get-VIEvent start time

Hi All,

new at PowerCLI.

I can see that the events for a VM on Vsphere shows events dating back two months, but when I run the Get-VIEvent -Start $start, I still get only the latest three hours of information.

Is there a better way to keep track of filtered events? I need to set up  a tracking script that will run once a day to check my users' usage of VMs.

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Did you include the MaxSamples parameter?
By default only 100 events are returned.

At something like this

Get-VIEevent -Start (Get-Date).AddDays(-14) -MaxSamples ([int]::MaxValue)


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

1 Reply
LucD
Leadership
Leadership
Jump to solution

Did you include the MaxSamples parameter?
By default only 100 events are returned.

At something like this

Get-VIEevent -Start (Get-Date).AddDays(-14) -MaxSamples ([int]::MaxValue)


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference