-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AzureResourceInventory.ps1 has command that causes issues #182
Comments
Hello there @TurnerMarshall If I'm not mistaken, Get-Module does not list modules installed using Install-Module, which is the case of Import-Excel. That is way we choose to use Get-InstalledModule |
Get-module gets all imported and any that are currently in the PSModule paths. If it was imported or sits within those paths it will show. Get-InstalledModule will show PowerShell commands that were installed with PowerShellGet. If you are not in an environment internet connected utilizing PowerShellGet becomes a more difficult task. I was able to just switch the commands in the prompt to get it to work on my end but figured depending on situations Get-Module will always work and Get-InstalledModule only works when that PSModule was brought in through that method. |
The thing is that in most cases Get-Modules will not report Import-Excel module as installed when it is indeed installed and the script will fail. We use Get-InstalledModule cause it correctly report Import-Excel module as installed every time. |
Line 235 and 241 of ARI/AzureResourceInventory.ps1 have "Get-InstalledModule" instead of "Get-Module"
The text was updated successfully, but these errors were encountered: