Virtual Machine Creation Date / PowerCLI

jibbajabbajibbajabba Posts: 4,317Member ■■■■■■■■□□
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: http://open902.com :p

Comments

  • QHaloQHalo Posts: 1,488Member
    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?

    http://communities.vmware.com/thread/148655
  • blargoeblargoe Self-Described Huguenot NC, USAPosts: 4,170Member ■■■■■■■■■□
    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: 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
    Working on: RHCSA 7, learning Ansible
    Future: RHCE? VCAP6.5-DCD?
Sign In or Register to comment.