instead of using "AzAccount" and its import statement , I used "AzureRMAccount" module.
this piece of code fixed my issue - Connect-AzureRMAccount –Identity
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am in the process of upgrading azure 'run-as-account' to 'manage-identities'. there were power-shell script that used to automate VM functionalities.
I import "Az.Accounts" module from Module section
Module Name - Az.Accounts
Module version - 2.19.0
Runtime version - 7.2
i import that module inside powershell (edit in portal) and used like below
Import-module 'Az.Accounts'
Connect-AzAccount -Identity
but i am getting below error
Import-module : The specified module 'Az.Accounts' was not loaded because no valid module file was found in any module directory. At line:7 char:1 + Import-module 'Az.Accounts' + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (Az.Accounts:String) [Import-Module], FileNotFoundException + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
what should i do to avoid above issue ?
instead of using "AzAccount" and its import statement , I used "AzureRMAccount" module.
this piece of code fixed my issue - Connect-AzureRMAccount –Identity