Document Azure subscription with PowerShell

Posted: 12th April 2016 by Anders Bengtsson in Azure, Scripts

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.

  1. Hi, Azure v1 works in a total different way. I guess you can write a similar script for v1, but there is no easy way to change this from v2 to v1, sorry. Maybe https://www.azuredockit.com/ can help you.

  2. Dave OD says:

    thanks for this Anders – this is a really useful script, much appreciated

  3. kapil says:

    Scripts look good is there a way to edit and use these for Azure V1 portal ?

  4. Naz Parker says:

    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.