How often you came across the scenario where you want to fetch the time stamp of the virtual machine for “n” number of reasons and you cannot due to unavailability of the respective api or feature.
Similarly we do not have direct way to fetch the time stamp of vm in azure, either by UI or api, one way it to fetch using the disks creation time but that’s a work around.
In this post we will be seeing how one can fetch the time creation of VM.
This is really going to be a very short post but its really a handy one.
Step 1: Download azure cli from here
Step 2: Run the below command as directed here
Step 3: Now fetch the vm details as directed here
az vm list
Validate the response and look for “timeCreated”
Let me know if you have any question.