-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathveeam-storage-reporting.ps1
49 lines (41 loc) · 1.11 KB
/
veeam-storage-reporting.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#run as admin
asnp veeampssnapin
$backups = get-vbrbackup
$storagefiles = @()
#storages
$backups | % {
$backup = $_
$files = $backup.GetAllStorages()
$files | % {
$file = $_
$storagefiles += New-Object -TypeName psobject -Property @{backupjob=$backup.Name;
file=$file.FilePath;
source=$file.Stats.DataSize;
compress=$file.Stats.CompressRatio;
dedup=$file.Stats.DedupRatio;
backup=$file.Stats.BackupSize;
}
}
}
$storagefiles | ft
$restorepointsinfiles = @()
#restorepoints
$backups | % {
$backup = $_
$rps = $backup | Get-VBRRestorePoint
$rps | % {
$rp = $_
#$rp.GetStorage()
$disks = $rp.AuxData.Disks
$disks | % {
$disk = $_
$restorepointsinfiles += New-Object -TypeName psobject -Property @{backupjob=$backup.Name;
vmname= $rp.VmName;
creationtime=$rp.CreationTime;
diskname=$disk.FileName;
diskcapacity=$disk.Capacity;
}
}
}
}
$restorepointsinfiles | ft