Question

Can you get VM creation date/time via PowerShell?


I am looking to see if there is a way to get the date/time a VM was created via Powershell. I tried using get-ntnxvm but that property was not exposed. Is there another cmdlet that could be used to get that information?

7 replies

Userlevel 2
Badge +6
you can check from prism central under the VM summary




https://portal.nutanix.com/#/page/docs/details?targetId=Prism-Central-Guide-Prism-v58:mul-explore-vm-details-view-pc-r.html
Badge
this does not answer the question. I'm also looking for the vm creation date at this time.
Badge +1
Does someone have the answer?
Really need the script to extract more than 500++ vm's info..
Userlevel 1
Badge +1
Yes, with the api you can get time in usec format..
Badge +1
Yes, with the api you can get time in usec format..
May i know how? thanks
Userlevel 1
Badge +1
well y can help you , but not with powershell . i am a python man...

I'm going to add this information in my script that I have in python ... if you wish you should have python 3.6 or higher and install some modules ... if you have no experience with this I can help you in some remote session.

What version of Prism Central and Prism Element do you have?

Example on the requests with the api

Userlevel 1
Badge +1
Its done on my script


I just tried it in an environment with 700VM, it takes about 3 minutes to execute the whole operation .. The script is similar to an RVTOOLS.

What I can modify in my gitub so you can download it, V1.4

https://github.com/dlira2/Nutanix-tools-for-AHV

I add the creation time keys :


Result :

Reply