Hello,
I'm not a veteran to either Veeam or Powershell. I was looking around and couldn't find this. I am looking for a script/command I can run on a VBR machine to pull backup success rates per job. I mean, is there a way to show that 28 of the last 30 jobs were successful? I'm sure I'm missing something online. Any help is appreciated.
-
- Service Provider
- Posts: 2
- Liked: never
- Joined: Oct 03, 2016 7:43 pm
- Full Name: Nick Barron
- Contact:
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: VBR 9(u2) Powershell question
Hi,
This
will count successful sessions for the "Job Name" job. You can substitute "Success" with "Failed". For more info about output format etc please use forum search.
Thanks
This
Code: Select all
Get-VBRBackupSession | where {$_.Result -eq "Success" -and $_.JobName -eq "Job Name"} | measure
Thanks
-
- Veeam Software
- Posts: 1818
- Liked: 655 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: VBR 9(u2) Powershell question
Also if you want to query the sessions multiple times, it better to first cache all sessions and then do your query e.g.
Especially if you loop over jobs, do a one time get-vbrbackupsession outside the loop and then use the local result
Code: Select all
$sess = Get-VBRBackupSession
$sess | where { $_.JobName -eq "Job 1"}
$sess | where { $_.JobName -eq "Job 2"}
-
- Service Provider
- Posts: 2
- Liked: never
- Joined: Oct 03, 2016 7:43 pm
- Full Name: Nick Barron
- Contact:
Re: VBR 9(u2) Powershell question
Thanks for your help. I'll begin building off that.
Who is online
Users browsing this forum: No registered users and 17 guests