Finding Indexed Jobs
When many users start with Veeam, they turn indexing on for everything not understanding what it does or that it requires Enterprise Manager. The environment I inherited had this exact issue. I have modified the jobs that the file servers are still indexed for quick search/restore but here is a handy little PS command to find all of the jobs using indexing on your Veeam Server.
Script
Get-VBRJob | where {$_.GetVSSOptions().WinGuestFSIndexingOptions.IsIndexingRequired -eq $True}
Listing all VM backup sizes
Another helpful PS script is to get the size of all of the VM backups. I often want to know which VM’s are taking up the most room, and having a total of the VBK’s and VIB’s without doing math on 30+ incrementals.
This will gather all the required info and can be exported if needed. If you have multiple repositories the jobs may show up more than 1 time as there will be a separate entry for each repo. It’s still a great way to charge back to the VM owners.
Script
$backups = Get-VBRBackup
$objectChains = @()
foreach($b in $backups){
$rps = Get-VBRRestorePoint -Backup $b
$objects = $b.GetObjects()
foreach ($object in $objects) {
$objectRps = $rps | where {$_.ObjectId -eq $object.Id}
$backupSize = 0
foreach ($objectRp in $objectRps) {
$storage = $objectRp.FindStorage()
$sizeRounded = Math]::Round($storage.Stats.BackupSize/1GB, 2)
$backupSize += $sizeRounded
}
$objectChains += $object | select DisplayName, @{n='BackupSizeGB';e={$backupSize}}
}
}
$objectChains