Get VM creation time in Azure

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

az login

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.
HAPPY LEARNING!!!



Categories: azure

Tags: , , , , ,

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: