Finding Azure Virtual Machine Creation Date and Time is not a property of any of the PowerShell or AZ CLI commands. But, with the help of disk creation date, we can find or get the Azure Virtual Machine Creation Date and Time.
In this article, we will be using Azure PowerShell Command to get the results and we will also see the process of checking the same using Azure Portal . Let’s dive into the procedure to find Azure Virtual Machine Creation Date and Time.
Approach 1: Using PoweShell
Follow the below steps to check the creation date and time of an Azure VM using PowerShell:
Step 1: Log in to Azure Portal .
Step 2: Open Cloud Shell >> Select PowerShell.
Step 3: Copy-Paste the following command in your Cloud Shell terminal
Get-AzDisk -ResourceGroupName "" -DiskName "" `
| Select Name, TimeCreated, @{N="VMname"; e = {($_.managedby -split "/")[8]} }
Note: Add ResourceGroupName and DiskName in the Query. (Refer Output)
Sample Output:
Approach 2: Using Activity Log of Azure Portal
Follow the below steps to check the creation date and time of an Azure VM using the activity log of the Azure portal:
Step 1: Log in to Azure Portal
Step 2: Navigate to Virtual Machines from global search and select your Azure VM
Step 3: After selecting the Azure VM from the left menu access Activity Log and Search for Created to get the time and date.
Note: If you are using activity log you can fetch data only for the past 90 days. Use the above method to get the data if it is beyond 90 days of time or you can use az rest api calls to get that data.
That’s it! These are the two approaches that can be used to check the creation date and time of an azure virtual machine.
Lost in the complex landscape of DevOps? It's time to find your way! Enroll in our
DevOps Engineering Planning to Production Live Course and set out on an exhilarating expedition to conquer DevOps methodologies with precision and timeliness.
What We Offer:
Comprehensive DevOps Curriculum
Expert Guidance for Streamlined Learning
Hands-on Experience with Real-world Scenarios
Proven Track Record with 100,000+ Successful DevOps Enthusiasts
Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated :
30 Mar, 2023
Like Article
Save Article
Share your thoughts in the comments
Add Your Comment
Please Login to comment...