Virtual Machine Creation Date / PowerCLI

jibbajabbajibbajabba Member Posts: 4,317 ■■■■■■■■□□
Anyone know a nice script how to find out when a machine was created (vSphere 4.x) ?

I have seen a few scripts ("who created the VM" etc.) but they are doing "too much"... for instance, I don't need the creation date and name in the notes field (in fact, must not) and I cannot give a time frame or the last x amount of days / VMs.

I'd need to be able to give a vcenter and guest name and it should return the creation date.

Anyone know if something like this is out there ?
My own knowledge base made public: :p


  • QHaloQHalo Member Posts: 1,488
    I'll see what I can come up with when I get home tonight unless you figure it out before then. Don't have access to my lab from here. If it can't be done from PowerCLI, you should be able to get it from a SQL query of the vCenter DB.

    Edit - did you try this stuff from Luc D and Alan Renouf?
  • blargoeblargoe Self-Described Huguenot NC, USAMember Posts: 4,172 ■■■■■■■■■□
    If it was recent enough it would be in the VCDB in the task history... 180 days is it? I did something similar to get snapshot creator user name. If I can find it I'll post the query.

    Is creation date a VM property that can be exposed in powercli?
    IT guy since 12/00

    Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
    Working on: RHCE/Ansible
    Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands...
Sign In or Register to comment.