Azure: Know your Azure VM created date using PowerShell & AzCli.

Do you want know when was your Azure VM created? Then this script will retrive date time created for the given Azure VM(s). Not sure whether there is direct way to retrieve the VM created date, but I couldn’t find any CmdLet to know the VM created date.

However, I have written a PowerShell function to know the VM created date by considering the VM OS disk creation date as VM creation date.

The function accepts the combination of Resource Group Name and VM Name as mandatory parameters or VM object(s), and you will see the output as below…

Screenshot from 2019-09-25 22-21-12

And, here is the script…

And even I have tried the same using Azure Cli as well, and it worked like this…

And you get the output like this

Screenshot from 2019-09-26 09-30-03

Thank you.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

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

Google photo

You are commenting using your Google 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.