I'm trying to find a list of backups in Hyper-V and found this script. How can i export the result to .CSV? Thanks
#* Load Veeam snapin
Add-PsSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue
## Coleção de vms nos hosts hyper-v
$AllVMs = Get-VBRServer -Name "lx1-vi-hpv-cl3", "lx1-vi-hpv-06" | Find-VBRHvEntity -HostsAndVMs
foreach ($VM in $AllVms)
{$VMBackup = get-vbrjob -Name "NIODO*" | Get-VBRJobObject -Name $VM.Name
if ($VM.Name -eq $VMBackup.Name)
{write-host $VM.Name ";" $VMBackup.Type}
else {write-host $VM.Name ";Unprotected" }
}