powershell - Get-AzureAccount 在 Az 模块中不起作用

标签 powershell azure-powershell azure-rm az

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/

相关文章:

regex - 如何在powershell中的正则表达式中插入变量

powershell - 将音乐复制到iPod

powershell - Azure PowerShell 将无法连接

azure - Terraform 云使用 Azure 运行触发器

azure - Terraform 如何跳过 1 个工作区的参数

powershell - AAD PowerShell v2 Add-MsolRoleMember 等效项

azure - 比较 AAD 和 ADS 之间的用户

Azure Function : DefaultAzureCredential. GetTokenAsync 在本地运行时失败

azure - 无法在 windows10 上使用 PS7 安装 Az powershell 模块

azure - 如何更新 azurerm_network_interface 的 ip_configuration 以添加 azurerm_public_ip?