PowerShell script exchange
oleg.feoktistov
Veeam Software
Posts: 501
Liked: 169 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: My Veeam Report v9.5.1

Post by oleg.feoktistov »

Hi John,

For some reason I cannot open Shawn's blog. Seems like his tenant is no longer available.
So, I cannot see what is needed to be changed there precisely to help you.
However, here is the option you can try:

Code: Select all

Get-VBRComputerBackupJobSession | select Id, JobId, Status, Result
As far as I see, for VBRComputerBackupJob type parsed with Get-VBRComputerBackupJob NextRun property is not implemented.
For CBackupJob type retrievable with Get-VBRJob NextRun renders empty as agent jobs are no longer supported by this cmdlet.

Thanks,
Oleg

chris.arceneaux
Veeam Software
Posts: 261
Liked: 139 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Kentucky, USA
Contact:

Re: My Veeam Report v9.5.1

Post by chris.arceneaux » 2 people like this post

For future readers of this thread, here's the direct link to Shawn's script on GitHub:

https://gist.github.com/smasterson/9136468

MiMaMo
Novice
Posts: 6
Liked: 4 times
Joined: Feb 27, 2020 3:04 pm
Full Name: Michael
Contact:

Re: My Veeam Report v9.5.1

Post by MiMaMo »

Hi!

For the current version 10a the script must be changed as follows:

Code: Select all

If ($VeeamVersion -lt 10.0.1.4854) {
  Write-Host "Script requires VBR v10.0.1.4854" -ForegroundColor Red
  Write-Host "Version detected - $VeeamVersion" -ForegroundColor Red
  exit
}
If executed I got an error in line 998 but I can't see an error in the output. So for me the script is working well enough. :D

Code: Select all

PS E:\> .\VeeamReport.ps1
Attempted to divide by zero.
At E:\VeeamReport.ps1:998 char:7
+       $repoObj = New-Object -TypeName PSObject -Property @{
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], RuntimeException
    + FullyQualifiedErrorId : RuntimeException
Maybe someone else please can have a look into the "divide by zero" error? Thanks in advance! :-)

oleg.feoktistov
Veeam Software
Posts: 501
Liked: 169 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: My Veeam Report v9.5.1

Post by oleg.feoktistov »

Hi Michael,

Cannot test my theory any time soon, but I'd look towards contents of $total variable:

Code: Select all

 $repoObj = New-Object -TypeName PSObject -Property @{
        Target = $name
        RepoHost = $repohost
        Storepath = $path
        StorageFree = [Math]::Round([Decimal]$free/1GB,2)
        StorageTotal = [Math]::Round([Decimal]$total/1GB,2)
        FreePercentage = [Math]::Round(($free/$total)*100) # Divides by zero here.
        MaxTasks = $maxtasks
        rType = $rtype
      }
On line 1019 it is passed as an argument to Build-Object function from CBackupRepository.InfoCachedTotalSpace property:

Code: Select all

$outputObj = Build-Object $r.Name $($r.GetHost()).Name.ToLower() $r.Path $r.info.CachedFreeSpace $r.Info.CachedTotalSpace $r.Options.MaxTaskCount $rType
Try checking which repository might be rendering 0 total space.

Thanks,
Oleg

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest