PrateekKumarSingh / AzViz

⚡ ☁ Azure Visualizer aka 'AzViz' : A #powershell module to automatically generate Azure resource topology diagrams by just typing a PowerShell cmdlet and passing the name of one or more Azure Resource groups
MIT License
603 stars 151 forks source link

export-azviz error out with resourc group not found #45

Closed MaximoTrinidad closed 3 years ago

MaximoTrinidad commented 3 years ago

Executing the following command to a valid Azure resource group:

 Export-AzViz -ResourceGroup azResourceEast01 -Theme light -OutputFormat png -Show;

Giving the following error:

Get-AzResource: C:\Users\max_t\Documents\PowerShell\Modules\AzViz\1.1.2\src\private\ConvertFrom-Network.ps1:90
Line |
  90 |  …      toCateg     = (Get-AzResource -ResourceId $to.ResourceId).Resour …
     |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Resource group 'Cust-t-r-i-n-i-t-y-0-c-o-m-837f9ff1-4a13-4318-9eca-a53a2c969bee' could not be found.
     | StatusCode: 404 ReasonPhrase: Not Found OperationID : 1d257410-fdb9-4773-ae88-69ef5af83c16

I'm not sure what I"m missing!

azviz_err_2021-05-13_16-26-02

MaximoTrinidad commented 3 years ago

@PrateekKumarSingh,

I figure out what was wrong! The error was due to an incomplete Azure AD Domain setup. As I don't need it for my lab yet. so, I so just remove it.

It works now!

It's not an actual bug. But it should trap this type of error. I'm going to close it!