PowerShell script exchange
Post Reply
acepero
Novice
Posts: 7
Liked: never
Joined: Feb 10, 2020 7:46 am
Full Name: Alberto Cepero
Contact:

Veeam Powershell get report

Post by acepero »

Good Morning

I have a small script that creates a report for me, but I can't get it to return correct data in: Deduplication Compress Transferred Start End

I suppose it is because I do not correctly collect the variable, but when I change it by:

LastBackuppSession

It brings me globle data not from the job in question

Code: Select all

$today = (get-date).Date
$backup = Get-VBRBackup | where {$_.info.jobname -eq "VS.BC.A.01. ProducciónInterna Infraestructura.Win"}
if ($backup) {
$backup.GetAllStorages() | where {$_.CreationTime.Date -eq $today} | 
Format-Table @{Name="Nombre de la VM"; Expression={$_.PartialPath.ToString().Split('.')[0]}},
@{Name="Total Size VM"; Expression={$_.Stats.DataSize/1GB}},
@{Name="Size VM"; Expression={$_.Stats.BackupSize/1GB}} ,
@{Name="Tranferido"; Expression={$_.Stats.TransferedSize/1GB}} ,
@{Name="Deduplicacion"; Expression={$_.Stats.DedupRatio/10}},
@{Name="Compress Ratio"; Expression={$_.Stats.CompressRatio/10}},
@{Name="Duration"; Expression={$_.Stats.Progress.Duration}},
@{Name="Start Time"; Expression={$_.Stats.CreationTime}},
@{Name="End Time"; Expression={$_.Stats.EndTime}}  
}
Result

Image (https://imgur.com/HgoIBI3)
veremin
Product Manager
Posts: 20389
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Veeam Powershell get report

Post by veremin »

Try a bit different expression and see whether it gives you proper results:

Code: Select all

@{Name="Deduplicacion"; Expression={100/($_.Stats.DedupRatio)}}
Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests