首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Stop-AzureVM不关闭我的Azure-VM (Runbook)

Stop-AzureVM不关闭我的Azure-VM (Runbook)
EN

Stack Overflow用户
提问于 2015-03-13 16:20:09
回答 1查看 541关注 0票数 0

为什么?

我有一个安装了Visual Studio的Azure VM。当我从这里运行关闭脚本(Runbook)时:https://gallery.technet.microsoft.com/scriptcenter/Stop-Azure-Virtual-Machine-0b1fea97

脚本状态显示它已完成,但它没有关闭我的虚拟机。输出显示正在关闭,但什么也没有发生。

对此有什么建议吗?

谢谢你的帮助。彼得

EN

回答 1

Stack Overflow用户

发布于 2015-03-17 20:32:40

我建议你做几件事-

a.大多数imp-转到资产选项卡并添加适当的windows powershell凭据(您只需使用用户名和密码,就可以登录到azure门户)。

b.将代码添加到runbook中。假设您的powershell自动化凭据名称为StartVM,您的订阅名称为xxx。在这种情况下,工作流程将是-

代码语言:javascript
复制
workflow StartVM
{
$Cred = Get-AutomationPSCredential -Name
StartVM' Add-AzureAccount -Credential $Cred
Select-AzureSubscription -SubscriptionName “xxx”
inlineScript
{
Start-AzureVM -Name TestServer -ServiceName CS12345
}
}

c.在此之后,您可以根据需要安排您的runbook。

希望这篇文章能帮助你-

http://azure.microsoft.com/blog/2014/11/25/introducing-the-azure-automation-script-converter/ http://azure.microsoft.com/en-us/documentation/articles/automation-create-runbook-from-samples/

谢谢。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29027625

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档