HyStop-AzureVM不會關閉我的Azure-VM(運行手冊)
我已經安裝了Visual Studio的Azure虛擬機。當我從這裏運行關機腳本(Runbook)時: https://gallery.technet.microsoft.com/scriptcenter/Stop-Azure-Virtual-Machine-0b1fea97
腳本狀態表示它已完成,但未關閉我的虛擬機。輸出說關閉但沒有任何反應。
對此有何建議?
感謝您的幫助。 彼得
HyStop-AzureVM不會關閉我的Azure-VM(運行手冊)
我已經安裝了Visual Studio的Azure虛擬機。當我從這裏運行關機腳本(Runbook)時: https://gallery.technet.microsoft.com/scriptcenter/Stop-Azure-Virtual-Machine-0b1fea97
腳本狀態表示它已完成,但未關閉我的虛擬機。輸出說關閉但沒有任何反應。
對此有何建議?
感謝您的幫助。 彼得
我建議你幾個東西 -
一個。大多數進入 - 轉到ASSET選項卡並添加適當的Windows PowerShell憑證(只需使用用戶名和密碼,就可以使用它登錄到Azure門戶)。
b。在runbook中添加您的代碼。假設您的PowerShell自動化憑證名稱是StartVM,並且您的訂閱名稱是xxx。在這種情況下,工作流將是─
workflow StartVM
{
$Cred = Get-AutomationPSCredential -Name
StartVM' Add-AzureAccount -Credential $Cred
Select-AzureSubscription -SubscriptionName 「xxx」
inlineScript
{
Start-AzureVM -Name TestServer -ServiceName CS12345
}
}
℃。在此之後,您可以根據需要安排您的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/
感謝。