I have a PS script as a YAML task to install Az module. On deployment, I see this error:

The specified module 'Az' with version '8.0.0' was not loaded because no valid module file was found in any module directory.

Here is the script:

Install-Module Az -RequiredVersion 8.0.0 -Scope CurrentUser -Force -AllowClobber
Import-Module Az -RequiredVersion 8.0.0 -Force

What am I missing?

enter image description here

1

There are 1 answers

0
user989988 On BEST ANSWER

After upgrading the version to 9.0.1, it worked fine!