In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to manage virtual machines in Windows Azure PowerShell, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article.
We can use Windows Azure PowerShell to manage the Windows Azure virtual machine. Let's take a look at how to create and delete virtual machines using Windows Azure PowerShell.
1. Get the virtual machine image. The command Get-AzureVMImage returns a list of virtual machine images. Since there are so many images in Azure, it is best to pipe this command into a txt file for viewing. In addition, because we only need to know the name of the image when we create the virtual machine with the New-AzureQuickVM command, we can execute Get-AzureVMImage and pipe filter to find out the ImageName. The figure below is as follows
two。 Gets the Azure area. Get-AzureLocation, again, we just need to know the displayname and filter the displayname through the pipeline.
3.New-AzureQuickVM creates a virtual machine.
Execute the following commands in PowerShell in turn
PS C:\ Users\ huangcj > $image = "55bc2b193643443bb879a78bda516fc8__Windows-Server-2012-Datacenter-20161214-zh.cn-127GB.vhd
"
PS C:\ Users\ huangcj > $location = Get-AzureLocation
PS C:\ Users\ huangcj > $svcname = "hcjtest"
PS C:\ Users\ huangcj > $admpass = "abc;123456"
PS C:\ Users\ huangcj > New-AzureQuickVM-Windows-InstanceSize "Large"-ServiceName $svcname-Name "hcjt5"-ImageName $ima
Ge-Password $admpass-AdminUsername "huangcj"-Location $location [0] .name
$location [0] .name is China East (Shanghai data center), and $location [1] .name is China North (Beijing data center).
After execution, we can see the created virtual machine in Azure Portal.
4. Delete virtual machine Remove-AzureVM
The delete command is relatively simple, as shown in the following figure
The above command does not delete the hard disk vhd file. If you want to delete it, add the parameter-DeleteVHD after it.
Thank you for reading this article carefully. I hope the article "how to manage virtual machines in Windows Azure PowerShell" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.