Document Azure subscription with PowerShell

Document Azure subscription with PowerShell

I would like to share an idea around documentation for Azure subscription, and hopefully get some ideas and feedback about it. What I see at customers is that documenting what resources are deployed to Azure is a challenge. It is also a challenge to easy get an overview of configuration and settings. Fortunately with Azure Power Shell we can easily get information about all resources in Azure. I have built an example script that export some settings from Azure and write them to a Word document.

The example script will export information about Virtual Machines, Network Interfaces and Network Security Groups (NSG). If you look in the script you can see examples of reading data from Azure and writing it to the Word document. You could of course read any data from your Azure environment and document it to Word. A benefit with a script is that you can schedule the script on intervals to always have an updated documentation of all your Azure resources.

Another thing I was testing was building Visio drawings with PowerShell. To do this I used this PowerShell module. The idea with this example is to read data from Azure and then draw a picture. In my example I included virtual machines and related storage accounts and network.

Download my example PowerShell scripts here.


Note that this is provided “AS-IS” with no warranties at all. This is not a production ready solution for your production environment, just an idea and an example.

8 thoughts on “Document Azure subscription with PowerShell

  1. Hi Anders

    Ive been trying out your word.ps1 script for some time now but without success.
    After eventually spending time on troubleshooting the errors worked out that a) it does not work with Word 2016….so word 2013 (32-bit) only worked for me.
    Secondly, I could only get the script to run against my azure tenant subscription successfully with using a x86 powershell ISE with the AzureRM and Azure powershell modules installed.

    I like your idea and thnk it can be very useful in many situations.
    My situation is being able to deploy an envoronment from a json template, document the deployment, destroy the deployed envoronment and then review the document to keep track of the environment and being able to hand both to a colleugue to review.

  2. Thanks. I’ve been looking for this for a while now since AzureDocKit is just too expensive. It would be great if the output contains detail similar to AzureDocKit. I’m looking forward to the next version of your script.

  3. Awesome tool and helping us to keep track of our VM’s.
    Is there any script for PaaS as well.

Leave a Reply

Your email address will not be published. Required fields are marked *