PowerShell script exchange
oleg.feoktistov
Veeam Software
Posts: 566
Liked: 198 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: 294
Liked: 151 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: 7
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: 566
Liked: 198 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: My Veeam Report v9.5.1

Post by oleg.feoktistov » 1 person likes this post

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

GianlucaCroci
Enthusiast
Posts: 74
Liked: 8 times
Joined: Feb 26, 2019 12:08 pm
Full Name: Gianluca Croci
Contact:

MyVeeamReport.ps1 and Veeam v10

Post by GianlucaCroci »

Hello,
I've a question about the "MyVeeamReport.ps1" report. After the Veeam upgrade to V10, this report doesn't work.
I guess in the new version there will be some commands that have changed but despite having found and changed the below, it still doesn't work.


1)
replace Get-VBRJob with Get-VBRComputerbackupJob

and

2)
#region Report
# Get Veeam Version
$VeeamVersion = Get-VeeamVersion

#If ($VeeamVersion -lt 9.5) {
# Write-Host "Script requires VBR v9.5" -ForegroundColor Red
# Write-Host "Version detected - $VeeamVersion" -ForegroundColor Red
# exit
If ($VeeamVersion -lt *10.0.0.4461*) {
Write-Host "Script requires VBR v10" -ForegroundColor Red
Write-Host "Version detected - $VeeamVersion" -ForegroundColor Red
exit
}



Did anyone find any further changes to make to the report?

Thanks in advance.
Kind regards
GianlucaCroci

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

Re: My Veeam Report v9.5.1

Post by oleg.feoktistov »

Ciao Gianluca,

Merged your post with the existing thread. Any particular error shown/data not being parsed in the report generated?

Thanks,
Oleg

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

Re: My Veeam Report v9.5.1

Post by MiMaMo »

In my newest reports where I changed the licensing from "Sockets" to "Instances" I got an error in the report about the License status:

Code: Select all

License/Support Renewal Date
Expiry Date		Days Remaining		Status
WMI Connection Failed	WMI Connection Failed	OK
But as the message is "green" it do not disturb the report status itself.

GianlucaCroci
Enthusiast
Posts: 74
Liked: 8 times
Joined: Feb 26, 2019 12:08 pm
Full Name: Gianluca Croci
Contact:

Re: My Veeam Report v9.5.1

Post by GianlucaCroci »

Hi Oleg,
thanks a lot.

At the moment I've this error "Unable to connect to VBR server".

I've tryed the connection with the FQDN of the server, and with "127.0.0.1" too (the script is executed on the server Veeam), and added the port "9392" for the connection, but nothing change.

Any idea?

Thanks
Kind regards
Gianluca

Natalia Lupacheva
Veeam Software
Posts: 276
Liked: 63 times
Joined: Apr 27, 2020 12:46 pm
Full Name: Natalia Lupacheva
Contact:

Re: My Veeam Report v9.5.1

Post by Natalia Lupacheva »

Hi Gianluca,

May I ask for some clarification here?
When exactly do you get this error message, on the report execution or when you just try to run any script?

Thanks!

GianlucaCroci
Enthusiast
Posts: 74
Liked: 8 times
Joined: Feb 26, 2019 12:08 pm
Full Name: Gianluca Croci
Contact:

Re: My Veeam Report v9.5.1

Post by GianlucaCroci »

Hi Natalia,
I've few reports. The base is "MyVeeamReport.ps1", but I've divided by type, so I don't have a too long report.
At the moment I've modified only one. When it'll work, I'll the same modifs on the others.
So I run this report and after 10-15 seconds I receive this error. I think as first try the connection with Veeam Server but go in timeout...

Thanks.
Kind regards
Gianluca

Natalia Lupacheva
Veeam Software
Posts: 276
Liked: 63 times
Joined: Apr 27, 2020 12:46 pm
Full Name: Natalia Lupacheva
Contact:

Re: My Veeam Report v9.5.1

Post by Natalia Lupacheva » 1 person likes this post

Gianluca,

ok, seems I managed to reproduce the issue.
Did you try with

Code: Select all

$vbrServer = "localhost"
configuration?

Thanks!

GianlucaCroci
Enthusiast
Posts: 74
Liked: 8 times
Joined: Feb 26, 2019 12:08 pm
Full Name: Gianluca Croci
Contact:

Re: My Veeam Report v9.5.1

Post by GianlucaCroci »

Thanks a lot. Worked.

Now I make the changes also on the others and then I perform a round of execution of all :-)

Kind regards
Gianluca

GianlucaCroci
Enthusiast
Posts: 74
Liked: 8 times
Joined: Feb 26, 2019 12:08 pm
Full Name: Gianluca Croci
Contact:

Re: My Veeam Report v9.5.1

Post by GianlucaCroci »

all modified and all tested. Work well...

Thanks Natalia.

Kind regards
Gianluca

JudgeWolf
Lurker
Posts: 1
Liked: never
Joined: Oct 07, 2020 1:26 pm
Full Name: Philip
Contact:

Re: My Veeam Report v9.5.1

Post by JudgeWolf »

Hello,

I have a question has anyone in this forum tried or managed to implement File Copy into the report? In my case the "Next Run" and the "Traget" are not shown.

Image

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests