Script Info
This script will connect to Symantec BackupExec server and using PowerShell, it will collect the following information about the backup jobs:
- Job Name
- Selection Summary
- Storage
- Start Time
- Elapsed Time
- Job Status
- Media Label
- Total Data Size Bytes
- Job Rate MB Per Minute
Moving to a New Blog Platform
This post is now moved to my new blog platform at https://blog.ahasayen.com. To continue reading this blog post, please click here
https://blog.ahasayen.com/most-amazing-exchange-email-report/
How hard would it be to show all the tapes used in a backup job instead of just the one tape?
Problem that they are not listed in same line but seperated in multiple lines..so it is hard to find a terminator where the tape list ends.. this is because im doing substring on the job log xml which is not easy and not object based.
im trying to get it, but the PowerShell module does not provide such information even when pulling the XML of the job itself. I will continue to search and see.
Ammar: Great Job on this. Pulling values like All Media Used and other useful metrics is not trivial, even when using the BE reporting tool. I do agree that multiple tapes / storage B2D files is valuable, but it also makes a bloated report. A consideration if you revise the script might be to add a hyperlink in the job name that would open the job log XML file. (Of course assuming read access to the Backup Exec log files). The script does work on BE2012 too.
Thanks.. i will do another try to understand how data is stored and try to pull it. Hope it will work 🙂
Ammar
Thanks for looking into it. I wonder if Symantec just takes all the media labels from a given job log then just removes the duplicates and displays that output as All Media Used?
Ammar, first of all, congrats for the fantastic script you’ve developed! I would like to ask why the report gives me the last ran jobs plus the queue jobs stated as N/A?
Thank you very much for this script Ammar!
When I run this script, I’m having many N/A jobs as output, Can I exclude this?
If possible and you don’t know what I mean with N/A. I can send the output to you?
Sure mean while i will review the script again
Hi Amar,
Did you have reviewed the script?
Hey Ammar,
I’m not all that familiar with powershell so I was wondering if you could tell me how to filter for two different job names at once? I’ve got it to filter for one but when I add a second one like this: “job 1”, “job 2” it just crashes and won’t run
I was wondering this as well. This would be really helpful.
I LOVE THIS SCRIPT!!
Hello Ammar,
Very good script, I use it everyday
Could you please add an option for TotalDataSizeBytes in GB ?
I’m think it’s more practical.
Thanks.
Is there a way to add Totaldatasizebytes in GB
Hi Ammar
Im wondering if you can help. I am writing a BEMCLI report tool for a customer. I want to Get the Server Names for each job schedule that has run in the last 24 hours.
When you pipe Get-BEjob into Get-Bejobhistory the property SelectionSummary does not appear to flow through the pipeline. I want to output this SelectionSummary
therefore i wanted to create 2x Variable for Get-BEJob & Get-BeJob | Get-bejobhistory and then create a custom function to pull the data from each variable and merge together in one output.
I hope I have explained this well enough.
here is a non working example of the code i have been attempting with varying success :
$GetBESCHED = Get-BEJob | Where-Object {($_.JobType -eq “Backup”) -and ($_.Status -eq “Scheduled”)} | Select SelectionSummary
$GetBESCHEDjob = Get-BEJob | Where-Object {($_.JobType -eq “Backup”) -and ($_.Status -eq “Scheduled”)} | Get-BEJobHistory | Where-Object {$_.EndTime -gt (Get-date).AddDays(-1)} | Select Name
foreach ($SCHED in $GetBESCHED)
{
$ServerName = @{‘Server(s) in Job’=$GetBESCHED}
New-Object -TypeName psobject -Property $ServerName
}
Foreach ($job in $GetBESCHEDjob)
{
$JobName = @{‘Job Name’=$GetBESCHEDjob}
New-Object -TypeName psobject -Property $JobName
}
Write-Output $ServerName,$JobName | Format-List
This kind of gives me what i want, but there is no way i can work out which servers failed for the last 24 hours for example. I can find out which job failed. but not which servers were in those jobs.
Hello Ammar,
We have around 130 Standalone servers in different locations, and almost all servers are installed BE 2014, shall we get all servers backup report in one excel? Please suggest.
Does Symantec System Recovery have the same capabilities? I want to be able to query the backup status like it shows in the SSR console (i.e. Backed Up, Failed, etc)
If so, how do you write a script for that?