This example gets a virtual machine object for the virtual machine named "MyVM" in the "myservice" cloud service, updates the virtual machine object by attaching an existing data disk from the repository using the disk name, and then updates the Azure virtual machine.
Windows PowerShell -
C:\PS>Get-AzureVM "myservice" -Name "MyVM" `| Add-AzureDataDisk -Import -DiskName "MyExistingDisk" -LUN 0 `| Update-AzureVM
References:
http://msdn.microsoft.com/en-us/library/dn495298.aspx
