Open In App

Microsoft Azure – Check Virtual Machine Creation Date and Time

Last Updated : 30 Mar, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

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.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads