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.
Thanks! Feel free to publish it on GitHub and add a link to my blog. Also please look at this work https://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting
Came accross your script. It had some errors in it. I fixed those. Do you have an updated version somewhere. I would like to publish the modified script on github. (Of course referencing this site).
hey, this may help clear up the error on set-visioshapecell….
yes, it references vba, but it’s the same variables being passed, and the error is also identical….
Set-VisioShapeCell : Specified argument was out of the range of valid values.
Parameter name: Only string values can be values in the hashtable. Encountered a key of type System.String
At line:1 char:1
+ Set-VisioShapeCell $props -Shapes $RG
+ CategoryInfo : NotSpecified: (:) [Set-VisioShapeCell], ArgumentOutOfRangeException
+ FullyQualifiedErrorId : System.ArgumentOutOfRangeException,VisioPowerShell.Commands.Set_VisioShapeCell
Sorry to hear it did not work for you. Since I wrote the blogpost I have found this service https://www.azuredockit.com/ , maybe it can help you.
Hi, sorry not from me. But it is all done with PS in my example. You can easy write a script that do exact the same but for PaaS.
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.
thanks for this Anders – this is a really useful script, much appreciated
Scripts look good is there a way to edit and use these for Azure V1 portal ?
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.
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.
Awesome tool and helping us to keep track of our VM’s.
Is there any script for PaaS as well.