My Veeam Report has been updated for the release of VBR 9.5 Update 3. If you’re ready to install Update 3, you’ll want to update My Veeam Report as well.
What’s New
This minor update fixes a couple of property changes introduced with VBR 9.5 Update 3. The good news is that you can copy and paste your entire User-Variables region from your 9.5.1 report making the transition fairly simple.
Sample Report
A sample report can be found here.
Setup
Download
Download the zip or copy and paste into a .ps1 file from here.
Configure
The next step is to configure the (many!) script options which is done in the User-Variables region. There are three variables that must be configured before running.
1) Add your VBR server name
# VBR Server (Server Name, FQDN or IP) $vbrServer = "yourVBRserver"
2) Ensure the path to the Veeam executable is correct
# Location of Veeam executable (Veeam.Backup.Shell.exe) $veeamExePath = "C:\Program Files\Veeam\Backup and Replication\Backup\Veeam.Backup.Shell.exe"
3) Configure Email Settings (or optionally the ‘Save HTML output to file’ section)
# Email configuration $sendEmail = $true $emailHost = "smtp.yourserver.com" $emailPort = 25 $emailEnableSSL = $false $emailUser = "" $emailPass = "" $emailFrom = "MyVeeamReport@yourdomain.com" $emailTo = "you@youremail.com"
From here I would familiarize yourself with all the different options the report has to offer. Everyone likes to see something different and the report can be customized to show only the data that is important to you.
I’ll note again that as there are so many items possibly returned from the script I foresee some folks setting up multiple scripts for best results. For example, one script to run a daily report on backups, another weekly report for Tape Backup Jobs and possibly another that just lists expired tapes on Fridays – it’s completely up to you, your processes and the size of your environment.
Validate Everything!
Though I have tried my best to test every possible outcome of the report, I will not be astonished if I have overlooked or fat-fingered something along the way. Please do us all a favor and validate the output against your console to ensure the data returned is correct. If you find something off, please let me know so everyone can benefit from the fix.
Thank You
Lastly, I would once again like to thank all the past and present contributors to this project. I’m not sure I would have had the motivation to start and continue this project entirely on my own and am grateful for all whom have given advice, insight, tested and/or contributed.
As always thanks for the update. Any plans on gathering information on Protection Groups and The backup Jobs using those protection groups? Not seeing my new backups jobs based on the groups in the report.
Not sure I will able to as I don’t have licenses for the new agents 🙁
You can get a trail license from Veeam if you register.
I have been using your scripts for some time now and it is the best out there!
Unfortunately all of our agents are now part of protection groups which are not showing in the reports.
You can get a license key from Veeam. I have been using your script for some time now and it is the best out there! Unfortunately all our agents are now part of the protection group so I am now stuck to console monitoring. 🙁
I am trying to user Veeam report 9.5.3. I am getting failed error for VM backup Protection Summary and VMs with No successful backups within RPO. I am not backing up all the VMs in vcenter. How can I run report only on the machine i am backing up to avoid this failed error?
You can exclude systems by datacenter, folder or name (including wildcards)
# Exclude VMs from Missing and Successful Backups sections
# $excludevms = @(“vm1″,”vm2″,”*_replica”)
$excludeVMs = @(“”)
# Exclude VMs from Missing and Successful Backups sections in the following (vCenter) folder(s)
# $excludeFolder = @(“folder1″,”folder2″,”*_testonly”)
$excludeFolder = @(“”)
# Exclude VMs from Missing and Successful Backups sections in the following (vCenter) datacenter(s)
# $excludeDC = @(“dc1″,”dc2″,”dc*”)
$excludeDC = @(“”)
thanks for the prompt reply. I am backing 40 machines out of 250 vm. Also they are from different folder and single data-center. Is there better way to cover that?
Not that I can think of…may be best to just turn off those parts of the report (set to $false)
Thanks Jonathan, I tried turn off those part by writing false but it didn’t work. Those part just not showing on the report but still the report shows as failed.
There must/should be something in the report that is coming up as failed. Could be license check, repository status, etc.
Feel free to forward me a copy of the report and I can take a look for you – smasterson @ gmail
That is what i was thinking and i just ran the raw report without any modification and it came failed with only two filed 1
1)VM backup Protection Summary
2)VMs with No successful backups within RPO.
Rest of the fields are green. I will fw you the report.
is there a way to exclude by VM Tag name?
Unfortunately, tags are not exposed.
Hi! Just started using your script! It works great, Thanks much! I am however having an issue excluding systems.
I’ve tried multiple versions of this, but it still doesn’t exclude them from the report
$showProtectedVMs = $true
# Exclude VMs from Missing and Successful Backups sections
# $excludevms = @(“vm1″,”vm2″,”*_replica”)
$excludeVMs = @(“_replica”,”Z-VRA”,”test”,”image”*,”base”)
i’ve also tried
$showProtectedVMs = $true
# Exclude VMs from Missing and Successful Backups sections
# $excludevms = @(“vm1″,”vm2″,”*_replica”)
$excludeVMs = @(“*_replica*”,”*Z-VRA*”,”*test*”,”*image*”*,”*base*”)
Any help with this would be great!
Thanks
Jeff
Hi Admin,
I’m also facing the same issue with Exclude Please help on this
What a great project you have here. I’ve started using it about a month ago and it makes things much easier to manage and helped me find a few deficiencies.
I just updated my script to this most recent one 9.5.3 but have not yet updated VBR to 9.5.3 and am getting this error:
Get-Date : Cannot bind parameter ‘Date’ to the target. Exception setting “Date”: “Object reference not set to an instance of an object.”
At D:\Reporting\Scripts\get-veeamreport-953.ps1:1267 char:23
+ If ((Get-Date $vmtask.Progress.StartTimeLocal) -ge (Get-Date $vms[$vmtas …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Get-Date], ParameterBindingException
+ FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Commands.GetDateCommand
I’d also like to recommend the option of including a list of Excluded hostnames
For VBR 9.5 Update 1 & 2 you should be using MVR 9.5.1 found in the previous post (wouldn’t let me link in comments..)
9.5.3 has no major changes other than fixing changes introduced with Update 3.
Unfortunately excluding via hostname doesn’t look possible as the hostname is not returned when a vCenter is used (only the Cluster).
To be more clear, an option to include in the report the hostnames that have been added to an exclusion list. This would come from the variables in the script, not vcenter.
Hi,
First time user, and very impressed. Nice work!
I had a single issue running the script, line 1267 kept generating errors
Get-Date $vmtask.Progress.StartTimeLocal and Get-Date $vmtask.Progress.StopTimeLocal had to be replaced with
Get-Date $vmtask.Progress.StartTime Get-Date $vmtask.Progress.StopTime
Now it just works 🙂
I did make a second change to make it a bit more dynamic during my testing, by including this input parameters I could change reportmode and basic e-mail from the command line.
Param (
[string]$vbrServer = “localhost”,
[string]$reportMode = 24,
[string]$emailTo = “man@mycompany.gl”,
[boolean]$sendEmail = $true,
[boolean]$Debug = $false
)
It looks as though you are running MVR 9.5.3 without yet installing VBR 9.5 Update 3.
You could either a) install Update 3 or b) revert to MVR 9.5.1 to alleviate the errors you are seeing.
that is correct – will be updating to MVR 9.5.3. in a pretty short while.
Thank you once again 🙂
Any Idea how to Show only Replication Tasks and status in the Report? Running the script and not showing Replication Tasks/Status only Replica Target Details for 1 Host
Never Mind found it 🙂
Love this Script. I’ve been using it for quite some time now. I really love the html formatting in a previous version where the status was highlighted in a block instead of the text. Is there are convenient way to modify this?
I want this: https://www.dropbox.com/s/nirib1ztcbw291n/Screen%20Shot%202018-01-14%20at%2010.52.09%20AM.png?dl=0
vs this (current version): https://www.dropbox.com/s/jkktgqk821vre83/Screen%20Shot%202018-01-14%20at%2010.52.47%20AM.png?dl=0
Dear smasterson!
great script and thanks for sharing it with us!
I’ve a question about the Backup Job Size,
This is the backup size of the vm backups of each job, for example SQL Logfiles (.vlb) are not included at this size.
Is it possible to report the vlb sizes of each job too?
br
fishy
You are correct that SQL logfiles are not included in the function used (Get-VBRBackup). I don’t believe there is an easy way to do this without parsing the log file for each VM.
thank you very much :! What a piece of art ! your script is great to learn Powershell too and so useful, Impressive :!
This is my two cents because i was using your last script for my own need :
What about an ESX based exclusion rules like that ?
# (line 90 ~=) define Esx to exclude
$excludeESX = @(“esa00099.idontwantyou.com”,”esa00098.idontwantyou.com”)
…
# (line 1250 ~=) use your smart “join regex array …. :!”
$excludeESX_regex = (‘(?i)^(‘ + (($script:excludeESX | ForEach {[regex]::escape($_)}) -join “|”) + ‘)$’) -replace “\\\*”, “.*”
…
# (line 1254 ~=) Add a new Exclusion condition to Find-VBRViEntity
Find-VBRViEntity |
Where-Object {$_.Type -eq “Vm” -and $_.VmFolderName -notmatch $excludefolder_regex} |
Where-Object {$_.Name -notmatch $excludevms_regex} |
Where-Object {$_.Path.Split(“\”)[1] -notmatch $excludedc_regex} |
Where-Object {$_.VmHostName -notmatch $excludeESX_regex} |
…
At first glance it appears as though this would certainly work.
The only add I would have is to be sure to add the additional Where-Object to both Find-VBRViEntity calls (lines 1247/1253) to ensure you are excluding both VMs and Templates (depending on configuration).
Thank you, that’s right, i forget the other call.
I’ve been stuck with a problem to include in the report usage from the License section of: nr of VMs, Number of used agents (server vs workstation). Is there a way that You could include that?
I’m not aware of any way to accomplish this…you might want to check the forums.
Hi Shawn,
Many thanks for the script, works a treat and have been using it with customizations for a while now.
One thing that isn’t working for us since Veeam 9.5.3 is that the Agent for Windows 2.1 jobs are now longer picked up/reported at all, these have been added to regular backup jobs as opposed to the older Agent jobs that populated back into B&R when a job was run.
When running Get-VBRJob – the new jobs containing/managing the 2.1 Agent for Windows don’t even show up. Same again if running Get-VBREPJob – Possibly a Veeam thing or perhaps I’m missing the corect command?
Cheers
Unfortunately I don’t have licenses for the new agents so it is hard for me to look into it. I also am unable to find cmdlets for the new protection groups.
Thanks for the updated script. In your comments you mentioned;
#region VersionInfo
$MVRversion = “9.5.3”
# Version 9.5.3 – SM
# Updated property changes introduced in VBR 9.5 Update 3
Can you explain more about the changes. We have this script running a new locations and its working great for non- update 3 locations. But if we run it manually we get no errors, but it doesn’t pull the VM/task status on update 3 systems; however, Session Info is pulled correctly and repository info are pulled correctly on the update 3 systems. Did veeam change their API in update 3.
Did syntax or cmdlets change in this script from the previous version?
The biggest change was in many of the Progress properties.
Prior to VBR Update 3 they looked similar to:
$vmtask.Progress.StartTime
$vmtask.Progress.StopTime
After Update 3 they now look similar to:
$vmtask.Progress.StartTimeLocal
$vmtask.Progress.StopTimeLocal
The report is great, I am just trying to sort an error that I am getting and wanted to see if you could provide some insight.
Get-Date : Cannot bind parameter ‘Date’ to the target. Exception setting “Date”: “Object reference not set to an instance of an object.”
At C:\scripts\report1.ps1:1267 char:23
+ If ((Get-Date $vmtask.Progress.StartTimeLocal) -ge (Get-Date $vms[$vmtas
It looks as though you are running the latest version of the report (9.5.3) against a VBR 9.5 server that does not have Update 3 installed.
Options include installing VBR 9.5 Update 3 or using an older version of the report (9.5.1).
Hi Shawn
It is really a great Report and very Handy – great work!
I use Veeam 9.5 Update 3 and your report 9.5.3 and use it in a Hyper-V Environment.
I have one problem:
My Report does not show up anything in the “VM Backup Protection Summary” and I also do not get the protected/unprotected VMs listed, all values are empty and categories are missing. Parameters in the config section are set to “true”
I have tested with Hyper-V 2012 R2 and Hyper-V 2016. The same script in a vSphere environment shows up those sections/systems.
With Report Version 9.0.1 this was working fine
Any ideas?
The report works mainly with vSphere only unfortunately, Hyper-V is not supported at this time.
For those asking about the Agent backups not showing up in the report it looks like there is an issue in 9.5U3 where the Get-VBREPJob powershell command does not return any info. I have verified this at a couple of my sites.
https://forums.veeam.com/powershell-f26/agent-details-for-an-endpoint-backup-t48251.html
Agreed, they haven’t implemented any powershell support for the protection groups for the new (paid) agents.
Old (free) agents are still supported.
I’d dare to guess that they will create new cmdlets for the new protection groups/agents.
I was looking for a way to add totals to the Get Backup Job Size. I came up with the following code that adds totals in, but it is not the cleanest method. Thought maybe you have a better way to do this.
# Get Backup Job Size
$bodyJobSizeBk = $null
$bodyJobSizeBkt = $null
$vmcount = $null
$vmdatasize = $null
$vmbackupsize = $null
If ($showBackupSizeBk) {
If ($backupsBk.count -gt 0) {
$bodyJobSizeBk = Get-BackupSize -backups $backupsBk | Sort JobName | Select @{Name=”Job Name”; Expression = {$_.JobName}},
@{Name=”VM Count”; Expression = {$_.VMCount}},
@{Name=”Repository”; Expression = {$_.Repo}},
@{Name=”Data Size (GB)”; Expression = {$_.DataSize}},
@{Name=”Backup Size (GB)”; Expression = {$_.BackupSize}} #| ConvertTo-HTML -Fragment
Get-BackupSize -backups $backupsBk | Sort JobName | ForEach {
$vmcount += $_.VMCount
$vmdatasize += $_.DataSize
$vmbackupsize += $_.BackupSize
}
$bodyJobSizeBkt = Get-BackupSize -backups $backupsBk | Select @{Name=”Job Name”; Expression = {“Total”}},
@{Name=”VM Count”; Expression = {$vmcount}},
@{Name=”Repository”; Expression = {$null}},
@{Name=”Data Size (GB)”; Expression = {$vmdatasize}},
@{Name=”Backup Size (GB)”; Expression = {$vmbackupsize}} -Unique #| ConvertTo-HTML -Fragment
$bodyJobSizeBk = $bodyJobSizeBk + $bodyJobSizeBkt | ConvertTo-HTML -Fragment
$bodyJobSizeBk = $subHead01 + “Backup Job Size” + $subHead02 + $bodyJobSizeBk
}
}
I think we recently ran into a gap that doesn’t seem covered by the report and totally slipped our attention. We learned that if an agent ran fine in the past but is now not running at all for some reason, we would not notice because the last backup was successful.
To cover for this we adjusted the code a little to notify us in RED when an agent has not created new recovery points for x amount of days. Also created a “warning level threshold”. If you are interested I would be willing to share my code but I am sure you cane code much better than me. 🙂
It would be very nice to have this integrated in your code.
hi Wouterlenaerts, I ran into the same gap few month ago, i work on a new array for agents with that sort of information but that it is so badly coded by mine that i don’t share it. I would be please to review your code and compare it with mine.
The code I adjusted was from version 9.0.3 of your script. I adjusted the following section.
—————————
# Get Successful Endpoint Backup Sessions
$bodySessSuccEp = @()
If ($showSuccessEp) {
If ($successSessionsEp.count -gt 0) {
If ($onlyLastEp) {
$headerSuccEp = “Successful Endpoint Backup Jobs”
} Else {
$headerSuccEp = “Successful Endpoint Backup Sessions”
}
Foreach($job in $allJobsEp) {
$bodySessSuccEp += $successSessionsEp | ?{$_.JobId -eq $job.Id} | Select @{Name=”Job Name”; Expression = {$job.Name}},
@{Name=”Start Time”; Expression = {$_.CreationTime}},
@{Name=”Stop Time”; Expression = { if($_.EndTime -lt (get-date).AddDays(-7)){“#fontred” + $_.EndTime + “fontred#”} else {$_.EndTime} }},
@{Name=”Duration (HH:MM:SS)”; Expression = {Get-Duration -ts $(New-TimeSpan $_.CreationTime $_.EndTime)}},
@{Name=”Last run”; Expression = {if($_.EndTime -lt (get-date).AddDays(-7)){“#fontred” + “Not for >7 days” + “fontred#”} elseif($_.EndTime -lt (get-date).AddDays(-2)){“#fontorange ” + “Not for >2 days” + ” fontorange#”} else {“OK”}}},
Result
}
$bodySessSuccEp = $bodySessSuccEp | Sort-Object “Start Time” | ConvertTo-HTML -Fragment
$bodySessSuccEp = $bodySessSuccEp -replace “#fontred”,””
$bodySessSuccEp = $bodySessSuccEp -replace “fontred#”,””
$bodySessSuccEp = $bodySessSuccEp -replace “#fontorange”,””
$bodySessSuccEp = $bodySessSuccEp -replace “fontorange#”,””
$bodySessSuccEp = $subHead01 + $headerSuccEp + $subHead02 + $bodySessSuccEp
}
}
Hi Shawn,
I use your report since many month. Great idea and great implementing.
With the version 9.53 I have a problem that the cloud provider is seen as windows service. When I only execute the commandline from the function “Get-VeeamServices” I get only the visible Veeam Services in Windows. I don’t understand where the cloud provider comes from?
The problem is that the cloud repo and the cloud provider appear as “unknown” and therefore as warning (yellow).
Do you have a suggestion to avoid or exclude the cloud components from report?
Thanks for spending your time with my problems
Harald
The Get-VeeamServices function is going to run for each server returned from Get-VeeamWinServers. Creating an exclusion in Get-VeeamWinServers should stop it from being passed to Get-VeeamServices.
Also, your service provider should be able to provide you access to veeam availability console
Pingback: Newsletter: March 3, 2018 – Notes from MWhite
Hi Shawn
Is there a way to make the report show the restore points for each backed up VM or the backup and copy jobs?
Regards, Sam
Hi Sam – restore points are not reported on here
Hi Shawn, can you please advise on how to change the status of a repository so it reports warning / critical based on a different threshold to other repositories?
The report would need to be tweaked as currently it uses one threshold for all repositories.
Hello,
Are “File to Tape” job supported ?
When I start the script, there is no report for File to Tape backup jobs.
If it is not implemented in your script, do you think I could do it by mylself ?
Any idea about the function in Veeam Snapin powershell I should use for that ?
Best Regards and thanks in advance 🙂
Thanks for the great Script it’s working great.
I have a situation where We have some Windows Agents used on a VM. So the Report shows VMs with No successful Backups within RPO shows the VM as not having a backup. But we do show the backup in the Agent jobs. So really the VM has been backed up in the RPO. Can you have the script check for the VM name in both the Agent and the Backup job info?
The VM’s with No Successful Backups section is only looking at VM backups. To clean it up (in this odd scenario), just exclude the VM via $excludeVMs.
Great work as always, thanks!
Is there a way to exclude backup jobs that failed on their first attempt, but succeeded on subsequent attempts from the report?
It’s frustrating to see a ‘failed’ report when said jobs were later successful.
Hello
You can utilize the following to only show the last session ran for each job
# Only show last Session for each Backup Job
$onlyLastBk = $true
Hi Shawn, we have an automated report engine that needs us to feed in report data as csv format. I love the comprehensive report, but trying to Export-Csv as a ‘single table’ with all monthly backup jobs and their stats (i can then pick and choose what i want). Im getting in way too deep trying to piece all the separate bits from your ‘My Veeam Report’ where I’m sure there is an nice way to do it all in one export- simply, any ideas? (I only need backup jobs, vm’s, success, restore points). Thanks!
Shawn,
Is there a way to include what repository a virtual was backed up to? We have multiple repositories and only some are replicated offsite (production only). I’m being asked to show what repository a virtual is backed up to so we can prove that it is being sent off to our DR site. Thanks.
I made a few additions to the script to allow for command line options for username, password and port options.
Also tweaked the script to automatically pull the VBR exe file from the registry, so no need to hard code it anymore.
The script will now output report “htm” files with the server name as well.
Added and changed bit below.
Enjoy!
Place above “#region User-Variables”.
param(
[Parameter(Mandatory=$true)][string]$Server,
[int]$Port,
[string]$User,
[string]$Password
)
if(!$Port)
{
# Sets default port if one was not specified.
$vbrPort = 9392
}
# VBR Server (Server Name, FQDN or IP)
$vbrServer = $Server
# Location of Veeam executable (Veeam.Backup.Shell.exe)
$veeamExePath = ((Get-ItemProperty -path "HKLM:\SOFTWARE\Veeam\Veeam Backup and Replication").CorePath + "Veeam.Backup.Shell.exe")
# Connect to VBR server
$OpenConnection = (Get-VBRServerSession).Server
If ($OpenConnection -ne $vbrServer){
Disconnect-VBRServer
Try
{
if($User){
# Username was specified. Use it.
Connect-VBRServer -Server $vbrServer -Port $vbrPort -User $User -Password $Password -Timeout 30 -ErrorAction Stop
} else {
# No username specified. Use current user to connect.
Connect-VBRServer -Server $vbrServer -Port $vbrPort -ErrorAction Stop
}
}
Catch
{
#Can't connect to Veeam.
Write-Host "Unable to connect to VBR server $vbrServer on $vbrPort"-ForegroundColor Red
exit
}
}
Hi,
Thanks of lot !!
Tell me, if it’s possible to add exclusion from Tags VM ?
Unfortunately Veeam does not expose the VMware Tags via PowerShell
OK, thanks. So can I exclude VM with description ?
I have many, many VM an many DC, folders, etc…. who don’t have backup and who will never have backup
Can I exclude Resource Pool ?
Hi,
I get the following errors:
What may cause this ?
Thanks !
PS C:\scripts> .\MyVeeamReport-Daily.ps1
At C:\scripts\MyVeeamReport-Daily.ps1:1241 char:97
+ … ForEach {[regex]::escape($_)}) -join “|”) + ‘)$’) -replace “\\\*”, ” …
+ ~~~~~~~~~~~~~~~~~~~~~
Expressions are only allowed as the first element of a pipeline.
At C:\scripts\MyVeeamReport-Daily.ps1:1241 char:118
+ … rEach {[regex]::escape($_)}) -join “|”) + ‘)$’) -replace “\\\*”, “.*”
+ ~~~~~~~~~~~
Unexpected token ‘\\\*”, “.*”
$excludefolder_regex = (‘(?i)^(‘ + (($script:excludeFolder | ForEach
{[regex]::escape($_)}) -join “‘ in expression or statement.
At C:\scripts\MyVeeamReport-Daily.ps1:1242 char:103
+ … ForEach {[regex]::escape($_)}) -join “|”) + ‘)$’) -replace “\\\*”, ” …
+ ~~~~~~~~~~~~~~~~~~~~~
Expressions are only allowed as the first element of a pipeline.
At C:\scripts\MyVeeamReport-Daily.ps1:1242 char:124
+ … rEach {[regex]::escape($_)}) -join “|”) + ‘)$’) -replace “\\\*”, “.*”
+ ~~~~~~~~~~~
Unexpected token ‘\\\*”, “.*”
$excludedc_regex = (‘(?i)^(‘ + (($script:excludeDC | ForEach
{[regex]::escape($_)}) -join “‘ in expression or statement.
At C:\scripts\MyVeeamReport-Daily.ps1:1243 char:95
+ … ForEach {[regex]::escape($_)}) -join “|”) + ‘)$’) -replace “\\\*”, ” …
+ ~~~~~~~~~~~~~~~~~~~~~
Expressions are only allowed as the first element of a pipeline.
At C:\scripts\MyVeeamReport-Daily.ps1:1243 char:116
+ … rEach {[regex]::escape($_)}) -join “|”) + ‘)$’) -replace “\\\*”, “.*”
+ ~~~~~~~~~~~
Unexpected token ‘\\\*”, “.*”
Hello
I tired this report for the first time, and its just perfect to get an health overview of the Veeam backup infrastructure.
I am using Veeam to orchestrate NetApp Storage SnapShots. We are creating every 3rd hour a stroage snapshot of the datastores.
Now in the “VM Backup Protection Summary ” report all my 170 VM’s are shown as fully protected. But actually only about 25 VM’s are currently backuped by a backup job, since we are just migration to Veeam.
So my question, is there a way to exclude storage snapshots from beeing shown the VM’s as fully protected?
Because we dont see storage snapshots as backup. So I would like to only see the VM’s which are backup by a backup job in the summery.
Thanks
Started getting the error “WARNING: Sequence contains no elements” when executing the script. Curious if anyone else has seen this.
Is there any way we can run this against the Veeam Availability Console?
Hi, it’s really great this script, but I’m looking for how to generate a report by date and not number of hours. Someone did that ? thx for your help
Hi, First of all Thanks for creating the extensive report script. It was very useful & informative.
Now let me come to the challenges that im facing.
1. Veeam services Section – I’M getting unable to connect error and the status shows unknown. Not sure what could be the problem as im able to RDP to the servers fine from the Veeam server.
2. License/Support Renewal Date – The expiry & days remaining is showing as WMI connection failed.
Can you advise me on how to get these issue fixed.
Many thanks for the excellent script. Very useful. As a possible future enhancement suggestion, it would be useful to be able to exclude selected vCenter Clusters from the report. We have a development cluster which we don’t back up.
Thanks for maintaining this great script. Would it be possible for you to add a “Last Run” date/time for each replication job in the Replication Job Status section? Many Thanks. PinPin.
I am also getting the following error:
Attempted to divide by zero.
At C:\VeeamReport\MyVeeamReport-RepOnly.ps1:1119 char:9
+ $objoutput = New-Object -TypeName PSObject -Property @{
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], RuntimeException
+ FullyQualifiedErrorId : RuntimeException
VBR v9.5.0.1922
MVR v9.5.3
PowerShell v4.0 (Windows 2012 R2 Server)
Any ideas?
Thanks.
PinPin
Hi, nice work on this script
i need some help to the exclude feature.
i try to exclude some “job names” but dont work can someone give me one option.
just try to add exclude Host ( hyperV) but the report allways show this jobs name and all the vms on them.
Nice script first off all.
1. I would like to exclude some repositories from “Repository Details”. We use Cloud Connect for some jobs and we do not have permissions to see storage space available, nor do I need to “monitor” them. Fixed it this way:
Change line 4115: ElseIf ($_.StorageTotal -eq 0) {“NoData”}
Change line 4125: } ElseIf ($arrRepo.status -match “OK|NoData”) {
2. I would like to exclude servers from the “Veeam Services”. Our repository servers is not in the domain for security reasons. Since you can’t make Get-Service without putting creds in the script, i don’t se other ways then to exclude them. Jobs would have failed anyways if the repository service was not running. And comes back with Unknown for Cloud Connect repos too.
Thank you very much for the report. I was looking for such report for sometime now. I managed to download and customized to only 1 page that we needed – “Backup Task” and comment those we don’t need (it run in less than 15 secs). This is good enough for us. Thank you once again.
Hi
I use you script for a while now and it works perfect. Have you already tested the script with the newest Veeam version 9.5 update 4? Does it work with this version?
thx
I ran the powershell script on update 4 today and it is looking fine
HI, i need a report Backup TAPE exactly as the email send by the system. I have around 13 veeam backup server, and i trying to get a powershell that get the information for the last tape backup for every server and create a HTML with that information exactly the same report send me each server separatly I wont to run only one script that connect each server and get that information and put one under one… Or just an script that create the report HTML for the last tape job run….
HI is possible from 1 veeam server connecto to other veeam a get same report for each server only in 1 HTML Report (Email + File)?
Thank you for the script, is there a way to add Physical server backups (Windows, Linux) to the script?
Shawn, thanks for sharing your scripts. Have you tested under Veeam Update 4. Do you know why the script might not pick up new Vm jobs / backups automatically?
Hi John
Unfortunately I have not had a chance to install Update 4 as of yet. At this point I am only running Veeam in my homelab and it has become a bit of a lower priority…:-(
As far as not picking up new jobs, the only thing I am aware of is the lack of reporting on ‘licensed/managed agent’ jobs. I do believe PowerShell access to these jobs was added in U4.
With the new Community license I am hoping to take a look when I can find the time…no promises.
–shawn
Shawn – thanks for the script. I do have an issue when running this in our environment: We have 4 ESX hosts – 2 are for productions VMs and 2 are for our DR site. When any of the “Find-VBRViEntity” statements are reached, I receive “WARNING: Failed to login to “(IP address of DR ESX server)” by SOAP, port 443, user “root”, proxy srv: port:0
I suspect this is because the DR server does not have a license associated with it right now (our vendor says that we will move the license over from production in the event we need to bring up the DR site). The DR servers are associated with some replication jobs, so I can’t remove them from the backup infrastructure… Is there a way I could eliminate them from being contacted within this script?
Thanks!
Hello Shawn,
first i want to thank you for your magnificent work. Tell me please can i get the vm’s in a given job sorted by criteria in the output ?
Thanks.
Hi Shawn
Love your script. It’s a critical part of our data protection. Thanks.
Quick question – Am I right in concluding that your script does not report on Windows Agent Backups?
Roger
Id like to tell people of a discovery i made today with the report with 9.5 update 4U. is that its no longer reporting the right backup data size etc. Some jobbs were more way off then others.
But in general its not reliable to use as a report to know that Backup Size. Anyone thats been continuing the work of this projekt?
Hi Jimmy
Can you elaborate more on what you are seeing here? I haven’t been able to reproduce this issue.
I’m also seeing this too. Veeam 9.5 U4
I have notifications turned on for each backup job. For example, the notification I receive, shows my backup size by 5.3GB for a set of my VM’s, If i look at the veeam report, it shows796.439999999999 GB. Looks pretty off.
From what i can se is that agent data is being ignore when on latent software. Only agents on oldersoftware are included
We have used the script for multiple servers and its working fine.
But with one of the Veeam server , its not listing the agent jobs even though the option is enabled in the script. Could it be because the script is not designed for version 9.5.4
Pingback: Newsletter: June 8, 2019 – Notes from MWhite
Anyone have a fix for the Agent problem?
Hi
I posted the same in the Veeam forum. Though haven’t tried that yet
https://forums.veeam.com/powershell-f26/my-veeam-report-v9-5-1-t47058.html
can some one help with agent backups? The script does not give the backup status of the agent jobs. Need help please..
Thanks In Advance
Hello there, very fond of your script. Just got it going again and it seems to have an issue with 9.5 Update 4. Any chance you will be updating it. I can arrange license if that helps.
Michael
I would like to know the same. Anyone have it working for 9.5.4b?
thanks
Jeff
No idea. It has not worked for me for a while.
Yeh ive seen that post aswell but its not a copy paste thing to fix by that post as far as i can see it. most likly easy for someone with the Powershell understanding. But that fix is past atleast my knowlage to do. Maby some other here can help out to implement it?
Crazy question, this report works great for monitoring our onsite backups. But – and it may just be me missing it – can it be pointed to the offsite backup job as well? And if so, in what Section?
Hi James
As I’ve never used/had access to offsite/cloud storage this was never built into the report.
Can you help identify why the report is detecting the amount of free/total space on my Pure Storage SAN? Veeam can see my SAN and total storage.
Pure Storage Snapshot Unknown 4 customer-bdr Pure Storage Storage 0.00 0.00 100 Warning
The last I looked into this, via PowerShell we can see that there is a repository but there is no way to access third party integrations (via Veeam’s PowerShell snapin). Not 100% sure if this still stands but I do believe so.
Ok. Thanks.
I think the answer to the problem is here
https://forums.veeam.com/powershell-f26/my-veeam-report-v9-5-1-t47058.html
Seems like some things has changed with the commands.
I think the answer to the problem is in the link here
https://forums.veeam.com/powershell-f26/my-veeam-report-v9-5-1-t47058.html
Seems like some things has changed with the commands.
There was some other in the post on this blog that talked about this. So no credit for me.
Guess the projekt is dead again?
Unfortunately it does not appear that Veeam included any way to report on Managed Agents jobs/tasks with Update 4, which is of course what everyone is looking for.
How you followed the Links ive sent that says you have to change some commands in order for it to work?
Yup, very little info is exposed and only at the job level, for certain types of jobs.
Veeam Services (Windows) shows a “unknown” status in the report for Cloud Connect.
In Veeam, Cloud Connect is connected up correctly and copying data over the destination.
For now i’ve commented this out of the report because it’s throwing a warning. Is there a fix for this?
Is there a way to save the output as a CSV instead of HTML?
Hi, just new to this script – fails to run with…
Get-Item : Cannot find path ‘C:\Program Files\Veeam\Backup and
Replication\Backup\Veeam.Backup.Shell.exe’ because it does not exist
This file doesn’t exist on the veeam server that I am running the script on.
Am I missing something ? Thanks
We only have standard and we are getting this error message:
Get-VBRTapeVault : This functionality is available in the Enterprise (or higher) edition only.
At C:\ent\util\Scripts\MyVeeamReport\MyVeeamReport.ps1:668 char:16
+ $mediaVaults = Get-VBRTapeVault
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VBRTapeVault], LicenseException
+ FullyQualifiedErrorId : System.ComponentModel.LicenseException,Veeam.Backup.PowerShell.Cmdlets.GetVBRTapeVault
I can ignore it but I thought I would mention it.
what if I want a smaller report? just a list of pass and failed jobs Please 🙂
You can customize the report by turning off items by changing the true to false, I did this so only the Backup Tasks section provides details and the rest are disabled.
Trying to save the report as a CSV, HTML is embedded everywhere, anyone know of a way to do this?
Sometimes the files are too large and I need to manually compress them as zip files, anyway to do this within the script, I did not see an option to compress the file?
Hello. Has anyone got this working on 9.5.4?
Hello JM, would you please for the love of us adapt the addon for V10? 🙂
+1 on getting it to work for v10 please. 🙂 My backup team uses this report daily.
Could get it running with v10 by setting the following parameters:
$MVRversion = “10.0.0.4461”
If ($VeeamVersion -lt 10.0) {
The reason this doesn’t work out of the box is $MVRversion really needs to be cast as a [version] datatype. Since it is not, running “10 -lt 9” will always return “True” as it is doing a character-by-character comparison, and “1” is less than “9”.
The proper way to get this working again (and have it be compatible with any version of Veeam) is to change “$VeeamVersion = Get-VeeamVersion” to “[version]$VeeamVersion = Get-VeeamVersion” and change “If ($VeeamVersion -lt 9)” to “If ($VeeamVersion -lt ‘9.0.0.0’)”. That will make it work with anything version 9.0 or above.
please… update 9.5.4…
make these changes but can’t make it work in Veeam 10
Hello all, Shawn….well V10 is here and the reports I rely on no longer function; keeping fingers crossed that you’ll have time to review Shawn, and MANY THANKS!
good afternoon! I really liked the script, but the percentage values of the jobs are not being displayed. can anybody help me?
Hello,
Monthly RPO should cover 35 days because “VMs with No Successful Backups within RPO” status generates false postive for monthly backup job.
For exemple a Monthly Job running each first Sunday could start after more than 31 days.
Will the powershell script also work for V10 versioning?
Seems the agent backup job doesnt work at all.
Get-VBREPJob returns nothing and Get-VBRComputerBackupJob doesnt return the info that the script is looking for to output to the HTML. Status,Target, NextRunTime etc.
Backup Copy and Agent based reporting not working on VBR 10 with latest version. Hoping this report gets updated with the new Powershell commands. Seems Veeam changed quite a bit in V10.
Amazing Script , anyone wondering if you need to get a yearly report ( for Auditors! ) then change line 690 $HourstoCheck = 8760 and make sure $reportMode = “Monthly”
Is there any my veeam report for version 10.0.0.4461? My veeam report is dead now after upgrade.
Did you try Alex B.’s recommendation? I’m able to run version 9.5.3 of the report against version 10.0.0.4461 of VBR.
VBR v10.0.0.4461
MVR v9.5.3
Hi Sean. Ran into this issue myself. I changed the “if” statement on line 1388 to “If ($VeeamVersion -lt 10)” and that skips the error message. Reporting for VMware backup jobs and retention jobs are unaffected. That should at least get you going until the next update.
Veeam V10 , I got it to work, however I have 5 physical workstations that are backed up by the Veeam server and I get no data from them. (they are managed by the server)
Any help here?
Veeam 10 version stopped working with the script report , here is the error , any idea can help would be appreciated ~~
PS C:\veeam_reports> C:\veeam_reports\MYVeeamReport.ps1
Connect-VBRServer : Access to the registry key ‘HKEY_LOCAL_MACHINE\SOFTWARE\Veeam\Veeam Backup and Replication’ is denied.
At C:\veeam_reports\MYVeeamReport.ps1:292 char:1
+ Connect-VBRServer -server $vbrServer
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-VBRServer], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Veeam.Backup.PowerShell.Cmdlets.ConnectVBRServer
Hi Fred, execute under “run as administrator” option.
Regards.
Is there any possibility to create the report for a specified period of time, e.g. February 2020? I could only find the hard coded amounts of days for “Monthly” reportmode, resulting in statistics for the last 720 hours.
Any help appreciated. Thank you in advance for any ideas.
Thanks for the great work on this script. I have made some slight mods and am running it with VEEAM 10.0.04461 P2.
The only real change was this. All the rest were just variable updates.
Ran into error with PowerShell closing due to version difference.
Remarked out exit command on this check.
If ($VeeamVersion -lt 9.5) {
is there a way to get this “$showUnprotectedVMs = $true” but only for replicas?
i need to know when i look at a vm, if he has just backups or replicas to
is there a way?
Hi Shawn Masterson
Do you have any plans to make myveeamreport.ps1 so it will support Veeam Version 10 ?
It’s super this script but it doesn’t work after upgrading to Veeam 10.
However, I have found version requirements in the script and changed this variable so the report is send & received, but there are still errors on the WMI license that still fail.
Kenneth
Following Kenneth Petersens question about a v10 version of this script.
Following. I’m using Veeam V10 and would love an updated version.
Hey guys,
I testing actually with Version 11 Beta 2 and played a little bit with
Powershell and created a fixed version for V11. It seems that some
changes was between V10 and V11.
Here I have stored my v11 version: https://github.com/marcohorstmann/psscripts/tree/master/MyVeeamReport
Marco, this is great. Thanks for sharing. Do you know if it’s possible to exclude a Repo from the Report?
Actually this is not in the code as far as I can unterstand the code. 😉
Sorry for late response. Didn’t got a notification.
Thank you so much for this!
following for v10
Hello Kenneth,
I had the same problem. After a little troubleshooting I found that Veeam does no longer use ‘expiration date’, but instead has changed is to ‘License expires’. To make the license part in the script work again, find this line in the script:
$pattern = “expiration date\=\d{1,2}\/\d{1,2}\/\d{1,4}”
and change it to:
$pattern = “License expires\=\d{1,2}\/\d{1,2}\/\d{1,4}”
Hope this helps.
René
Hi Guys, also trying to get this working for v 10.0.1.4854
Made the modifications you guys pointed out. Does anyone know why I’m getting this error?
Method invocation failed because [Veeam.Backup.Core.CBackupRepository] does not contain a method named ‘GetContainer’.
At E:\Scripts\VeeamBR_Report11.ps1:1034 char:43
+ $outputObj = Build-Object $r.Name $($r.GetHost()).Name.ToLower( …
+ ~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
Method invocation failed because [Veeam.Backup.Core.CBackupRepository] does not contain a method named ‘GetContainer’.
At E:\Scripts\VeeamBR_Report11.ps1:1034 char:43
+ $outputObj = Build-Object $r.Name $($r.GetHost()).Name.ToLower( …
+ ~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
Method invocation failed because [Veeam.Backup.Core.CBackupRepository] does not contain a method named ‘GetContainer’.
At E:\Scripts\VeeamBR_Report11.ps1:1083 char:54
+ … $outputObj = Build-Object $rs.Name $r.Name $($r.GetHost()).Name.T …
+ ~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
Great Report, and thank you for the effort. I went through the trouble to add
$emailBCC = “emailaddress1@domain.com, emailaddress2@domain.com”
$msg.Bcc.Add($emailBCC);
Thank You!!
Hello Marco,
Thank you for the update for V11 especially around the calling of the PowerShell module.
This made my report start running again.
Thank you
I am so glad I found this and for Marco Horstmann !!!
MyVeeamReport V11
MyVeeamReport.ps1
Hi Shawn
Thank you for this amazing tool, it works very well, even with version 11.
The only problem that I have with it, is that it only shows 300 successful VM backups.
Is there a way to change that so it shows all the VMs?
Has anyone fixed the script to work with Agents on Veeam 11?
Has anyone tried this with Veeam 12?
I am interested as well.
Its Works fine