Error when creating Image
DhillanK opened this issue · 3 comments
Hi,
Not sure what is going on, but when trying to run this on one of my Resource Groups I get the following error.
▶ Plotting sub-graph for Azure Resource Group: "RGName" 5m 12s
Get-ImageNode : Error formatting a string: Index (zero based) must be greater than or equal to zero and less than the size of the argument list..
At C:\Users\username\Documents\WindowsPowerShell\Modules\AzViz\1.2.1\src\private\ConvertTo-DOTLangauge.ps1:182 char:39
- ... $nodes += Get-ImageNode -Name "$tocateg/$to".tolower() -Rows ($to, ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (<TD align="...FONT>:String) [Get-ImageNode], RuntimeException
- FullyQualifiedErrorId : FormatError,Get-ImageNode
Did you get it to work?
Do you by any chance happend to have an application gateway in that resource group? I'm seeing the same result and have tracked it down to network watcher results for an application gateway.
I can't remember now, but I did run it on my RG with an AGW and it worked. The diagram is massive though, so I can see much.
Ok.
I dont have much experience with NetworkWatchers, but it seems (in my case atleast) that the associations belonging to Application Gateway dont have a type/provider/category defined. When Get-ImageNode
tries to split the $toCateg
it fails because it's null
. That's why you are seeing this error.