Created
March 10, 2015 07:53
-
-
Save astaykov/8400c8c91ec8dd78e401 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-AzureProfile -Force | |
cls | |
Add-AzureAccount | |
Select-AzureSubscription -SubscriptionName '<your subscription name here>' | |
Set-AzureSubscription -SubscriptionName '<your subscription name here>' -CurrentStorageAccountName '<storage account name where disks should be placed>' | |
$vm = Get-AzureVM | Where-Object { $_.Name -eq '<name of the VM to update>' } | |
Add-AzureDataDisk -CreateNew -DiskSizeInGB 50 -DiskLabel '<label of data disk 1>' -HostCaching ReadOnly -LUN 2 -VM $vm.VM | |
Add-AzureDataDisk -CreateNew -DiskSizeInGB 50 -DiskLabel '<label of data disk 2>' -HostCaching ReadOnly -LUN 3 -VM $vm.VM | |
Add-AzureDataDisk -CreateNew -DiskSizeInGB 50 -DiskLabel '<label of data disk 3>' -HostCaching ReadOnly -LUN 4 -VM $vm.VM | |
Update-AzureVM -Name $vm.Name -ServiceName $vm.ServiceName -VM $vm.VM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment