We need to check the increment and full restore points to check. For
instance, one of our VM has 10 daily increment without any full, we need to
check it manually at the moment and it is very time consuming.
We would like Powershell script to print these all in csv file.
We have created one powershell script by modifying (already made by someone
in this forum for their environment). This is working but it is taking lots
of time and giving all unnecessary information.
Is there any way to make it faster by modifying this script?
Code: Select all
Disconnect-VBRServer #Disconnect Server
Add-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue # Adding
VeeamSnapin
Connect-VBRServer -Server "localhost"-Port "9392"
# To connect Veeam Server
remove-item "desktop\FolderData3.csv" -force
$veeam_vms = Find-VBRViEntity | Where-Object {$_.id -like "*_vm*"} | sort
name
$backupcheckdate = (get-date).AddDays(-31)
$colrestorepoints= @()
foreach($vm in $veeam_vms)
{
$veeamrestorepoints = $null
$vmname = $vm.name
#write-host "Checking $vmname"
write-host "working on $vmname"
$veeamrestorepoints = Get-VBRRestorePoint -Name $vmname | Where-Object
{($_.GetBackup().JobType -eq "") -AND ($_.creationtime -ge
$backupcheckdate)} | Sort-Object $_.creationtime -Descending
$colrestorepoints += $veeamrestorepoints
}
$colrestorepoints | Export-Csv -Path desktop\FolderData3.csv
-NoTypeInformation -Append # Saves Result in Csv file