-
-
Notifications
You must be signed in to change notification settings - Fork 160
Open
Description
I have a problem where network connections span resource groups for which I lack sufficient permissions to interrogate. I use the following patch as a workaround:
diff --git a/AzViz/src/private/ConvertTo-DOTLangauge.ps1 b/AzViz/src/private/ConvertTo-DOTLangauge.ps1
index 36fd35b..c406450 100644
--- a/AzViz/src/private/ConvertTo-DOTLangauge.ps1
+++ b/AzViz/src/private/ConvertTo-DOTLangauge.ps1
@@ -47,7 +47,12 @@ function ConvertTo-DOTLanguage {
$Counter = $Counter + 1
Write-CustomHost "Plotting sub-graph for $($Target.Type): `"$($Target.Name)`"" -Indentation 1 -color Green -AddTime
- $VNets = Get-AzVirtualNetwork -ResourceGroupName $Target.Name -Verbose:$false
+ try {
+ $VNets = Get-AzVirtualNetwork -ResourceGroupName $Target.Name -Verbose:$false
+ }
+ catch {
+ $VNets = $false
+ }
$NetworkLayout = @()
if ($VNets) {
Metadata
Metadata
Assignees
Labels
No labels