Get-AzureAccount 在 Az 模块中不起作用。它给出以下错误:
Get-AzureAccount : The 'Get-AzureAccount' command was found in the module 'Azure', but the module could not be loaded. For more information, run 'Import-Module Azure'.
+ Get-AzureAccount | ForEach-Object { Remove-AzureAccount $_.ID -Fo ...
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-AzureAccount:String) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
此命令在 AzureRM 模块中工作,因为 AzureRm 正在 Markdown ,我们需要将所有命令更改为 Az 模块。
请帮忙! 提前致谢
最佳答案
要使用 Az 登录 Azure,命令是:
Connect-AzAccount
安装 PowerShell Core 7 并安装 Az 这样你就可以运行 AzureRm 和 Az
Uninstall-AzureRm
Find-Module -Name Az | Install-Module -AllowClobber
关于powershell - Get-AzureAccount 在 Az 模块中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62772943/