JulianHayward / Azure-MG-Sub-Governance-Reporting

Azure Governance Visualizer aka AzGovViz is a PowerShell script that captures Azure Governance related information such as Azure Policy, RBAC (a lot more) by polling Azure ARM, Storage and Microsoft Graph APIs.
MIT License
814 stars 293 forks source link

Management Group Name #197

Closed netkrish80 closed 1 year ago

netkrish80 commented 1 year ago

AzGovViz version Latest Version

CodeRunPlatform e.g. Visual Studio Code Azure CLI Terminal

Describe the bug If we run the script against the management group name Tenant Root Group by entering the command .\AzGovVizParallel.ps1 -ManagementGroupId Tenant Root Group we are receiving error. The code accepts the name of the management group in two words only ( for example :"Training Demo". if its more than two words its throws an error. If we enter the management group id instead of name it will work. But we get the ID only against the Tenant Root Group. If we need to run the report against any other management group and the name is more than two words we cannot execute the report.

Screenshots \Azure-MG-Sub-Governance-Reporting-master\Azure-MG-Sub-Governance-Reporting-master\pwsh> .\AzGovVizParallel.ps1 -ManagementGroupId Tenant Root Group
Start Azure Governance Visualizer 21-Jun-2023 19:03:35 (#6.2.1) Checking PowerShell edition and version PS check passed : (Major[7]; Minor[3] gt 0); (minimum supported version '7.0.3') PS Edition: Core; PS Version: 7.3.4 PS Version check succeeded Output/Files will be created in path 'C:\Users\Azure\Reporting\Azure-MG-Sub-Governance-Reporting-master\Azure-MG-Sub-Governance-Reporting-master\pwsh.' Verify 'AzAPICall' (Group) AzAPICall - Deviating module version 1.1.72 'AzAPICall Group' not installed Do you want to install AzAPICall module (Group) from the PowerShell Gallery? (y/n): y Exception: C:\Users\Azure\Reporting\Azure-MG-Sub-Governance-Reporting-master\Azure-MG-Sub-Governance-Reporting-master\pwsh\AzGovVizParallel.ps1:29114:33 Line | 29114 | … throw " 'Install-Module -Name $($module.ModuleName) -Req … | ~~~~~~~~~~~~~ | 'Install-Module -Name AzAPICall -RequiredVersion Group' failed

Additional context Add any other context about the problem here.

netkrish80 commented 1 year ago

Hi Julian,

Please close this issue. The ID and Name are different. My Apologies.