Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell Get-AzureRMSubscription在使用登录azurermaccount登录后产生错误_Powershell_Azure_Powershell 5.0 - Fatal编程技术网

Powershell Get-AzureRMSubscription在使用登录azurermaccount登录后产生错误

Powershell Get-AzureRMSubscription在使用登录azurermaccount登录后产生错误,powershell,azure,powershell-5.0,Powershell,Azure,Powershell 5.0,我试图使用get-azurermsubscription获取可用订阅的列表,以便在运行set-azurermcontext之前从五个订阅中选择一个。我得到一个错误: 找不到方法:“Microsoft.Azure.Subscriptions.Models.SubscriptionListResult” get-azurermcontext显示有效的tenatant id和有效的订阅id,但当然不会显示所有订阅 我下载了2015年3月的Powershell安装程序,以确保所有内容都是最新的,但存在相

我试图使用get-azurermsubscription获取可用订阅的列表,以便在运行set-azurermcontext之前从五个订阅中选择一个。我得到一个错误:

找不到方法:“Microsoft.Azure.Subscriptions.Models.SubscriptionListResult”

get-azurermcontext显示有效的tenatant id和有效的订阅id,但当然不会显示所有订阅

我下载了2015年3月的Powershell安装程序,以确保所有内容都是最新的,但存在相同的问题

刚刚升级到VisualStudio 2015更新2和powershell v5。使用另一台具有类似配置且工作正常的机器


我应该怎么做才能解决这个问题?

我不能添加评论,所以改为这样做。2016年7月12日收到AzureRM模块并更新至1.6.0版。我确认cmd Get AzureRMSubsction在Windows10机器上工作。

您正在使用的Azure PowerShell版本是什么?Windows 10$PSVersionTable.PSVersion=5.0.10586.122 Nuget 2.8.5.127I怀疑您的azureRM模块版本不匹配。确保所有PowerShell会话都已关闭,打开新的PowerShell窗口并运行
安装模块AzureRM-force
,查看这是否解决了问题。