PowerShell script to unmount a disk on Azure
Add-AzureRmAccount Select-AzureRMSubscription -SubscriptionName “mysubscription” $VirtualMachine = Get-AzureRmVM -ResourceGroupName “ResourceGroupName” -Name “VMName” Remove-AzureRmVMDataDisk -VM $VirtualMachine -Name “DiskName” Update-AzureRmVM -ResourceGroupName “ResourceGroupName” -VM $VirtualMachine Continue reading PowerShell script to unmount a disk on Azure