$resourceGroupName = 'rg-OMS' $location = 'eastus2' $vmName = 'x007' $snapshotName = 'snapX007disk' $diskAccountType='Premium_LRS' $osDiskName = 'newX007fromSnapshot' $vm = get-azurermvm -ResourceGroupName $resourceGroupName -Name $vmName $snapshot = New-AzureRmSnapshotConfig -SourceUri $vm.StorageProfile.OsDisk.ManagedDisk.Id -Location $location -CreateOption copy -SkuName $diskAccountType # create a snapshot New-AzureRmSnapshot -Snapshot $snapshot -SnapshotName $snapshotName -ResourceGroupName $resourceGroupName $snapshot = Get-AzureRmSnapshot -ResourceGroupName $resourceGroupName -SnapshotName $snapshotName $diskConfig = New-AzureRmDiskConfig -Location $snapshot.Location -SourceResourceId $snapshot.Id -CreateOption Copy -SkuName $diskAccountType $disk = New-AzureRmDisk -Disk $diskConfig -ResourceGroupName $resourceGroupName -DiskName $osDiskName # list all disks Get-AzureRmDisk -ResourceGroupNa...