VMware Cloud Community
WarlockArg
Enthusiast
Enthusiast

Show all tasks for an object

Hello,

     Is there any way to see all the older tasks for an object? In particular I want to see all the tasks that have been issued for a Virtual Machine from its creation, but the web client only shows me the last 45 tasks and I have no way to see older tasks. I'm looking for which user created it. Perhaps there is another more direct method to find it out, but it would be right to also know to see all tasks.

Thanks in advance,

Guido.

1 Reply
lamw
Community Manager
Community Manager

If you're looking for information about a given VM and when it was created (including user), then you'll want to use Events info rather than tasks. I can't speak for the vSphere UI, as it could be limiting the window but Task/Events are also limited based on your default retention period (typically 30 days by default IIRC and more chatty your env, it could roll)

Better way to search for this information is using Automation and Events API, try:

Get-VIEvent -maxsamples 10000 | Where {$_.Gettype().Name -eq "VmCreatedEvent"}

and see if it gives you what you need. You can certainly filter it down further by comparing to the entity name (e.g. VM name) but at least this will give you a starting point

Reply
0 Kudos