Closed cocallaw closed 1 year ago
Hi I also facing the same issue.
Start Azure Governance Visualizer 20-Jul-2023 16:30:56 (#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.6
PS Version check succeeded
Output/Files will be created in path 'C:\Azure\Reporting\Azure-MG-Sub-Governance-Reporting-master\Azure-MG-Sub-Governance-Reporting-master\pwsh.'
Verify 'AzAPICall' (Group)
AzAPICall - Deviating module version 1.1.75
'AzAPICall Group' not installed
Do you want to install AzAPICall module (Group) from the PowerShell Gallery? (y/n): y
Exception: C:\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
@cocallaw agree this should be fixed/handled differently. As a workaround please simply uninstall the 1.1.75 version then it should work. @netkrish80 I guess you are passing a value (string, bool, etc.) to a switch parameter which causes this behavior
@JulianHayward adding more detail and update
Install-Module -Name AzAPICall
which installed 1.1.75 current version Get-Module -ListAvailable
and saw that both 1.1.75 and 1.1.72 were installed Uninstall-Module -Name AzAPICall -AllVersions
Get-Module -ListAvailable
, and restarted PS Session@netkrish80 Please try running Uninstall-Module -Name AzAPICall -AllVersions
, then relaunch your PowerShell session and try to run the AzGovVizParallel.ps1 script again
@cocallaw and @JulianHayward thank you for you suggestioin. After uninstall it worked.
seems all are happy :) Thanks - closing..
AzGovViz version 6.3.0
CodeRunPlatform PowerShell 7.3.6 Windows Terminal AAD User Account
Describe the bug AzGovVizParallel.ps1 fails to complete validation check for AzAPICall Module, even though current version (1.1.75) and specified version (1.1.72) are currently installed. When prompted by the script to install the module by typing y, I can see the installation process occurring, but validation check does not pass and I am asked to install again.
Screenshots Error Output
Additional context Reviewing the output of
Get-Module -ListAvailable
it appears that the AzAPICall Module is not being installed for PowerShell 7 Core but the native Windows PowerShell desktop version.