Increase the Data Disk Size for an Azure RM VM

This Runbook lets you Increase the Data Disk size for a VM. Data Disk Size reduction is not supported by Azure. It supports Data Disk resizing for both Managed and Unmanaged disks. It lets you increase the size only for one Data Disk at a time, and not for all Data Sisks atta

 
 
 
 
 
(0)
822 times
Add to favorites
Windows Azure
1/16/2018
E-mail Twitter del.icio.us Digg Facebook
  • couple of issues
    3 Posts | Last post February 20, 2018
    • Hi, great script, very helpful and timely :)
      
      Just a couple of issues:
      1. as provided here line 76 contains the command  $servicePrincipalConnection = Get-AutomationConnection -Name $connectionName         
      
      In order to work with Resource Manager VMs this should be:  $servicePrincipalConnection = Get-AzureRMAutomationConnection -Name $connectionName         
      
      2. In line 177: Start-AzureRmVM -ResourceGroupName $ResourceGroupName -Name $VMName -AsJob > $null
      the parameter -AsJob is not recognised which prevents the VM restarting
    • Sorry, it turns out I had some out of date powershell modules in my automation account.  The syntax is fine in the current modules.
    • Thanks @Hipinse. Glad you found it useful :-)