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
817 stars 295 forks source link

AzAPICall failed to install #181

Closed ppodevlabs closed 1 year ago

ppodevlabs commented 1 year ago

AzGovViz version 6.1.0

CodeRunPlatform Console. Mac OS powershell

Describe the bug when i try to run the script it states that the AzAPICall module is not installed in powershell though it is installed, mostly because it is not getting properly the required version and try to install "true" version. Check the output below:

Start Azure Governance Visualizer 12-Apr-2023 16:55:00 (#6.1.0)
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.3
  PS Version check succeeded
System memory utilization: % (not double)
Output/Files will be created in path '/Users/pedrop/Workspace/github/JulianHayward/Azure-MG-Sub-Governance-Reporting/wiki/.'
 Verify 'AzAPICall' (true)
  AzAPICall - Deviating module version 1.1.72
  'AzAPICall true' not installed
  Do you want to install AzAPICall module (true) from the PowerShell Gallery? (y/n): y
Exception: /Users/pedrop/Workspace/github/JulianHayward/Azure-MG-Sub-Governance-Reporting/pwsh/AzGovVizParallel.ps1:29108
 Line |
29108 |  …             throw "  'Install-Module -Name $($module.ModuleName) -Req …
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |   'Install-Module -Name AzAPICall -RequiredVersion true' failed
JulianHayward commented 1 year ago

@ppodevlab thanks for reporting. I do not have a MAC to repro. I have no clue where the true origins from. can you test the https://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting/blob/master/pwsh/dev/functions/verifyModules3rd.ps1 ?

ppodevlabs commented 1 year ago

@ppodevlab thanks for reporting. I do not have a MAC to repro. I have no clue where the true origins from. can you test the https://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting/blob/master/pwsh/dev/functions/verifyModules3rd.ps1 ?

hi! i did some more testing and it happened when trying to use -NoDefinitionInsightsDedicatedHTML

JulianHayward commented 1 year ago

@ppodevlab I cannot repro the issue at all..

ppodevlabs commented 1 year ago

@ppodevlab I cannot repro the issue at all..

i will close the issue as this was caused by a wrong usage of the cli. if you pass -NoDefinitionInsightsDedicatedHTML it tries to install AzAPICall module version true