So, after some time my friends and I released the first version on a PSQuickGraph module. It is also available on GitHub. It is to be able to analyze dependencies in a scripted way.
Let’s give it a try. First you need to do is to install it. To do it, just start PowerShell and issue the following command, which installs the module from PS gallery
Install-Module PSQuickGraph -Scope CurrentUser
Next thing you need to do is to install graphviz. It is a command line tool which takes the text file in a special format and makes a picture from it. You can take it from here and simply unzip in into a folder. In my case I use c:\temp\graphviz folder. Once it is there you can do some magic.
First – start PowerShell and say:
Now just open this link and copy the contents to the PowerShell window. And in a second you will see a your first graph made using PowerShell.
You can do a lot more with it,
In our environment we have more than one subscription. Even more than two. And this amount grows constantly. What we do with all of this is we support VMs and stuff there. One of the issues is that users usually do not know name of Azure Service which is used to host their VMs, and it so happens that they do not know even their Subscription Name or Subscription ID. To bring up and control their VMs and environments the use some “middleware” which hides all of this info from them. So they usually come to us and say: “here you are a list of VMs we have problems with, please have a look and fix”. Sometimes such list contains not only VMs but storage accounts along with VMs etc. Unfortunately classic azure cmdlets does not provide an option to search for objects in the cloud by their name. On the other hand new Azure Management portal does. It can find objects by name. So I decided to do a little hack end use this API in order to simplify our live.
Continue reading “How to search for object in Azure”