Hello @Angelo Bertolotti ,
Apologies for the delay , here is the edited script to extract the information into a CSV file
$AllVMs = Get-AzureRMVM
Write-Host "VMName,VMSKU,OSDiskName,OSDiskIOPS,OSDiskSize,OSDiskThroughPut,DataDiskName,DataDiskSize" -ForegroundColor "Cyan"
foreach($vm in $AllVMs)
{
$VMDetails = Get-AzureRMVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName
$OsDisk = Get-AzureRmDisk -ResourceGroupName $vm.ResourceGroupName -DiskName $VMDetails.StorageProfile.OsDisk.Name
$datadisk = $VMDetails.StorageProfile.DataDisks
$details = $VMDetails.Name +","+ $VMDetails.HardwareProfile.VmSize+","+ $VMDetails.StorageProfile.OsDisk.Name+","+ $OsDisk.DiskIOPSReadWrite+","+$OsDisk.DiskSizeGB +","+$OsDisk.DiskMBpsReadWrite+"," + $datadisk.Name+","+$datadisk.DiskSizeGB
$details >> "output.csv"
}
Let us know if you have additional questions , if the above information helps out kindly make sure to "Upvote and accept the answer"