无法使用powershell

时间:2018-01-24 19:38:39

标签: powershell azure

我订阅的是经典VM和RM VM的混合。我怎么会写一个PowerShell脚本来阻止订阅中的所有虚拟机。我无法使用Get-azurermVM cmdlet检索经典VM。如何在订阅中获取Classic VM的列表? 。我尝试过以下命令并抛出错误

...添加-AzureAccount

PS C:\ windows \ system32> Select-AzureSubscription -SubscriptionName" xxxxx" Select-AzureSubscription:订阅名称xxxxxx不存在。 参数名称:名称 在行:1个字符:1 + Select-AzureSubscription -SubscriptionName" xxxxx" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~     + CategoryInfo:CloseError:(:) [Select-AzureSubscription],ArgumentException     + FullyQualifiedErrorId:Microsoft.WindowsAzure.Commands.Profile.SelectAzureSubscriptionCommand

0 个答案:

没有答案