Generate Veeam Session Report (HTML) from Powershell

PowerShell script exchange

Re: Generate Veeam Session Report (HTML) from Powershell

Veeam Logoby s.strub » Tue Dec 06, 2016 1:17 pm

Hello Shestakov,
Thanks for the fast response, we use Backup & Replication 9.0.
We need to know if the (a specific) Backup to Tape Job successful was. And we need pretty much all the information on this picture:
Image
The different jobs which get backup, how long they had and how big they were and how much got transferred.

Regards
Seraphim
s.strub
Novice
 
Posts: 3
Liked: never
Joined: Wed Nov 30, 2016 9:51 am
Full Name: Seraphim Strub

Re: Generate Veeam Session Report (HTML) from Powershell

Veeam Logoby Shestakov » Tue Dec 06, 2016 1:34 pm

If you have Veeam ONE, I would choose Backup Job Historical Information report. Otherwise, try scripts provided above in the thread.
Thanks!
Shestakov
Veeam Software
 
Posts: 5141
Liked: 430 times
Joined: Wed May 21, 2014 11:03 am
Location: Saint Petersburg
Full Name: Nikita Shestakov

Re: Generate Veeam Session Report (HTML) from Powershell

Veeam Logoby s.strub » Wed Dec 07, 2016 10:44 am

I tried this: https://github.com/tdewin/powershell/tree/master/BR-MimicReport but I can't use it with Backup to Tape Jobs, normal Backup Jobs work but I need it for Tape Jobs.
Regards
Seraphim
s.strub
Novice
 
Posts: 3
Liked: never
Joined: Wed Nov 30, 2016 9:51 am
Full Name: Seraphim Strub

Re: Generate Veeam Session Report (HTML) from Powershell

Veeam Logoby v.Eremin » Fri Dec 09, 2016 3:14 pm

There is a Get-VBRSession cmdlets returning tape sessions. You can play with it and objects it returns and see how far you can get it with your task. Thanks.
v.Eremin
Veeam Software
 
Posts: 13728
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Generate Veeam Session Report (HTML) from Powershell

Veeam Logoby gveat » Thu Mar 02, 2017 6:35 pm

We just did an upgrade to 2016 and VBR 9.5U1. When I run the script now, I get;

Code: Select all
PS C:\Users\gregv> C:\PS\MimicReport - Copy.ps1
Get-VBRJob : Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Veeam\Veeam Backup and Replication' is denied.
At C:\PS\MimicReport - Copy.ps1:657 char:17
+       $Jobs = @(Get-VBRJob | ? { $_.JobType -ieq $jobtype }) | Sort-O ...
+                 ~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], UnauthorizedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException
 
C:\PS\MimicReport - Copy.ps1 : Can not find Jobs with type Backup
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,MimicReport - Copy.ps1
 
C:\PS\MimicReport - Copy.ps1 : Did not write anything
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,MimicReport - Copy.ps1
gveat
Influencer
 
Posts: 17
Liked: 2 times
Joined: Thu Sep 29, 2016 6:21 pm
Full Name: Greg Veater

Re: Generate Veeam Session Report (HTML) from Powershell

Veeam Logoby gveat » Thu Mar 02, 2017 6:46 pm

Access issue was fixed by running as administrator.
gveat
Influencer
 
Posts: 17
Liked: 2 times
Joined: Thu Sep 29, 2016 6:21 pm
Full Name: Greg Veater

Re: Generate Veeam Session Report (HTML) from Powershell

Veeam Logoby gveat » Thu Mar 02, 2017 6:48 pm

I am running this script against a "Backup Copy" job. The report is retuned with no information inside of it. It is just blank with the server and Veeam version info. Is there something that needs to be changed to report on a backup copy job?
gveat
Influencer
 
Posts: 17
Liked: 2 times
Joined: Thu Sep 29, 2016 6:21 pm
Full Name: Greg Veater

Re: Generate Veeam Session Report (HTML) from Powershell

Veeam Logoby gveat » Thu Mar 02, 2017 7:40 pm

You can scratch my past couple of posts. It was an issue with a name change. I changed the name of the job and the report was running blank, until I had a session of the job complete.
gveat
Influencer
 
Posts: 17
Liked: 2 times
Joined: Thu Sep 29, 2016 6:21 pm
Full Name: Greg Veater

Re: Generate Veeam Session Report (HTML) from Powershell

Veeam Logoby v.Eremin » Fri Mar 03, 2017 9:02 am

I was about to suggest the same: check whether the script is executed under admin account and see whether job with the provided name exists. Glad to hear, though, that you've figured it out all by yourself. :)
v.Eremin
Veeam Software
 
Posts: 13728
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Previous

Return to PowerShell



Who is online

Users browsing this forum: No registered users and 1 guest