Avatar of jack jones
jack jones
 asked on

how to get logs of who created VM and when?

I found couple of scripts to query who created VM, but they were not returning the results for the older VM. Can i query independent of time of creation and return the Creator

I got below result

VMname : Vm-test
CreatedTime : NoEvent
CreatedMonth : NoEvent
CreationMethod : NoEvent
Creator : NoEvent
Powershell* PowerCLIVMware

Avatar of undefined
Last Comment
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

8/22/2022 - Mon
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

Are your scripts querying the database or event logs ?
jack jones

ASKER
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

what are you expecting, e.g. how many days old, do you want to go back ?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
jack jones

ASKER
Im looking for who created that VM no matter how old it is..
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

That script should report on tasks and events, on vCenter Server.
jack jones

ASKER
Exactly thats why im not getting creator for older VM any way to do so...
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

The Database Retention Policy for tasks and events is 30 days.

but all tasks and events are stored in the vCenter Database.

So you are searching for VMs created before this date ?
jack jones

ASKER
Yes correct
ASKER CERTIFIED SOLUTION
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
jack jones

ASKER
how do you query vCenter Server database .. can i directly connect or know about which database and information in it
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

use the script I uploaded...