使用Powershell关闭使用预览门户创建的,没有Cloud Service名称的VM [英] Using Powershell to shutdown VM created using Preview Portal, with no Cloud Service Name

查看:43
本文介绍了使用Powershell关闭使用预览门户创建的,没有Cloud Service名称的VM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在没有云服务名称的情况下,如何使用Powershell关闭使用Azure预览门户创建的虚拟机?即我应该为ServiceName参数输入什么...

How can I use Powershell to shutdown a Virtual Machine created using the Azure Preview Portal when there is no Cloud Service Name? i.e. what do I put for the ServiceName parameter...

谢谢!

推荐答案

如果它是使用资源管理器api创建的虚拟机(我猜是如果它没有云服务),则需要切换到Powershell中的资源管理器模式,并从那里访问您的vms:

If it's a vm created using the resource manager api (and I guess it is if it doesn't have a cloud service), you need to switch to the resource manager mode in Powershell and access your vms from there:

Switch-AzureMode -Name AzureResourceManager
$vms = Get-AzureVM

这篇关于使用Powershell关闭使用预览门户创建的,没有Cloud Service名称的VM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆