Want to resize VMs in azure resource manager

Asked 2 years ago, Updated 2 years ago, 131 views

I create a VM in Azure and a script to resize the VM in powershell.
Classic has a resizing command, but is it possible to resize it in the resource manager?

Resource Manager commands were not found when searching with "size 」 as an argument in Get-command.
Hasn't this command been implemented yet?

azure powershell

2022-09-30 19:18

1 Answers

It seems that the easy-to-understand command has not yet been implemented.
I think this is what it looks like to actually change it.

$VMName="2007CMCEN"
$NewVMSize="Standard_A5"

$vm = Get-AzureRmVM-ResourceGroupName$ResourceGroupName-Name$VMName
$vm.HardwareProfile.vmSize=$NewVMSize
Update - AzureRmVM-ResourceGroupName$ResourceGroupName-VM$vm

Reference URL: http://blogs.technet.com/b/mmodin/archive/2015/12/01/resize-azure-arm-virtual-machine-with-powershell.aspx


2022-09-30 19:18

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.