停AzureVM不关机呢我Azure的VM(运行手册) [英] Stop-AzureVM does not shutdown my Azure-VM (Runbook)

查看:331
本文介绍了停AzureVM不关机呢我Azure的VM(运行手册)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

海兰

我有一个蓝色的VM与安装Visual Studio。当我从这里运行关机脚本(运行手册):
https://gallery.technet.microsoft.com/scriptcenter/Stop-Azure-Virtual-Machine-0b1fea97

I've an Azure VM with Visual Studio installed. When I run the Shutdown script (Runbook)from here: https://gallery.technet.microsoft.com/scriptcenter/Stop-Azure-Virtual-Machine-0b1fea97

脚本的状态说,这是完成了,但它并没有关闭我的虚拟机。输出表示关闭,但没有任何反应。

Script Status says it is completed but it did not shut down my VM. Output says Shutting down but nothing happens.

在这个有什么建议?

感谢您的帮助。
彼得

Thanks for your Help. Peter

推荐答案

我会建议你一些东西 -

I would suggest you few things-

一个。大多数imp-转到资产标签,并添加适当的Windows PowerShell凭据(只是可以使用用户名和密码,同样使用登录到蔚蓝的门户)。

a. Most imp- Go to ASSET tab and add proper windows powershell credentials (simply you can use username and password, the same you use to login to azure portal).

乙。添加您的code的运行手册。假设你的PowerShell自动化凭证的名字是StartVM和订阅的名字是XXX。在这种情况下,工作流将是 -

b. Add your code in the runbook. Suppose your powershell automation credential name is StartVM and your subscription name is xxx. In this case the workflow will be-

workflow StartVM
{
$Cred = Get-AutomationPSCredential -Name
StartVM' Add-AzureAccount -Credential $Cred
Select-AzureSubscription -SubscriptionName "xxx"
inlineScript
{
Start-AzureVM -Name TestServer -ServiceName CS12345
}
}

℃。在此之后,你可以安排你的运行手册,按您的需求。

c. After this you can schedule your runbook as per your need.

希望这个人会帮助你 -

Hope this one will help you-

http://azure.microsoft.com/blog/2014/11/25/introducing-the-azure-automation-script-converter/ <一href=\"http://azure.microsoft.com/en-us/documentation/articles/automation-create-runbook-from-samples/\" rel=\"nofollow\">http://azure.microsoft.com/en-us/documentation/articles/automation-create-runbook-from-samples/

感谢。

这篇关于停AzureVM不关机呢我Azure的VM(运行手册)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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