Skip to content
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

D4Storage-PricingEstimation-Per-Storage.ps1 requires az.Storage #830

Open
slootsky opened this issue Dec 13, 2023 · 1 comment
Open

D4Storage-PricingEstimation-Per-Storage.ps1 requires az.Storage #830

slootsky opened this issue Dec 13, 2023 · 1 comment
Assignees

Comments

@slootsky
Copy link

Describe the bug
script D4Storage-PricingEstimation-Per-Storage.ps1 requires the Az.Storage module, but it isn't listed as a #Requires

To Reproduce
try to run the D4Storage-PricingEstimation-Per-Storage.ps1 script without having the az.Storage module installed

receive error

Line |
20 | $storageAccounts = Get-AzStorageAccount -ErrorAction Stop
| ~~~~~~~~~~~~~~~~~~~~
| The term 'Get-AzStorageAccount' is not recognized as a name of a cmdlet, function, script file, or executable
| program. Check the spelling of the name, or if a path was included, verify that the path is correct and try

Expected behavior
It should fail earlier with an error that a required module is missing. Similar to how Az.Monitor is warned about

.\D4Storage-PricingEstimation-Per-Storage.ps1
.\D4Storage-PricingEstimation-Per-Storage.ps1: The script 'D4Storage-PricingEstimation-Per-Storage.ps1' cannot be run because the following modules that are specified by the "#requires" statements of the script are missing: Az.Monitor.

Additional context
Add any other context about the problem here.

@velahuer
Copy link
Collaborator

velahuer commented Dec 13, 2023

Edited. @slootsky Can you check if that fixes the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants