$VMName = ""
$rgName = ""
$vm = Get-AzureRmVM -ResourceGroupName $rgName -Name $VMName -status
$state = $vm.Statuses[1].Code
While ($state -ne "PowerState/stopped")
{
Start-Sleep -Seconds 600
$vm = Get-AzureRmVM -ResourceGroupName $rgName -Name $VMName -status
$state = $vm.Statuses[1].Code
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.