Abstract
For human race, there are some common tasks in daily
life which you must do. Without which humans can survive but you can’t say if they
are “living the life”. For example, taking a bath is one of such tasks. You can
survive without taking a bath but you will not like it. These tasks are those
which bring “life” to humans daily lives and make them enjoy their stay on earth.
Out of these humans there is special category of humans –
I call them “Humans who work in Software field”. They can be sub-categorized into
below –
1. Software
developers
2. IT administrators
3. Project managers
4. Software Engineers
5. Solution Architects
2. IT administrators
3. Project managers
4. Software Engineers
5. Solution Architects
For all these sub-categories you can apply prefix such
as Senior, Junior, Principal, Full Stack, Distinguished and in recent times we
have a new addition to this prefix known as “CLOUD”. These are humans who can
easily survive without bath but there is one thing without which none of these
humans can survive and it is known as “Export to CSV”. It is more or equally
important like eating food and drinking water for them.
No matter how many cutting edge features and service
Microsoft Azure is bringing, we still feel the product or service is not
complete unless you offer “the” functionality of “Export to CSV”. Surprisingly
Azure VM export to csv do not exists on Azure portal and you need to write a PowerShell
for this. Therefore my lazy followers and friends asked me to write PowerShell
to export Azure VM to CSV. So here we are!
Let’s go!
Current state of feedback
Users have provided the feedback to bring the
functionality of export to csv for all azure resources on the portal. It is on the
roadmap. You can view the details here - https://feedback.azure.com/forums/216843-virtual-machines/suggestions/37934101-virtual-machine-list-export-to-csv.
Why yet another new script?
I spoke to multiple people who are dealing with Azure
VMs daily basis and requirements from there for CSV was an eye opener. Many of
the scripts available today provides very minimal details about VM when exported
to CSV. Most of the Azure Administrator find them not so useful. So after a
quick survey with few of Lazy followers I received below list as a top ask for
Azure VM to CSV export. In the below list the top ask was to retrieve Azure
VNET for Azure VM and Azure VNET subnet for Azure VM using PowerShell. I have
addressed this as well in the script.
So, current script provides the CSV output of Azure VMs
with great details. Refer below columns list –