PowerShell script exchange
benrpatterson
Novice
Posts: 4
Liked: never
Joined: Aug 29, 2014 7:38 am
Contact:

Re: SysAdmin Modular Reporting (SAMReport) for Veeam

Post by benrpatterson » Sep 01, 2014 2:21 pm

This is really really useful, thank you :D

If I want to run the Get-JobStatusSummary for a certain period of time, is it possible?

Is there a list of modules that others have also created for this script?

Many thanks
BP

v.Eremin
Veeam Software
Posts: 15221
Liked: 1146 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: SysAdmin Modular Reporting (SAMReport) for Veeam

Post by v.Eremin » Sep 01, 2014 2:38 pm

I've taken a brief look at source code and it seems that Get-JobStatusSummary takes only the latest sessions ($Session = $Job.FindLastSession()). If you want to get sessions from a certain period of time, you will have to modify that variable. Thanks.

benrpatterson
Novice
Posts: 4
Liked: never
Joined: Aug 29, 2014 7:38 am
Contact:

Re: SysAdmin Modular Reporting (SAMReport) for Veeam

Post by benrpatterson » Sep 02, 2014 7:21 am

Thanks Vladimir,

I'm pretty useless on the scripting. How could i amend that variable please? I was looking for something like, between 2 dates, get those job details.

$Session = $Job.FindLastSession()

Thanks,
Ben

v.Eremin
Veeam Software
Posts: 15221
Liked: 1146 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: SysAdmin Modular Reporting (SAMReport) for Veeam

Post by v.Eremin » Sep 02, 2014 7:40 am

Hi Ben,

In order to get backup sessions occurred between certain dates, you will have to write something like the following:

Code: Select all

$Date1 = Get-Date -Date "datetime"
$Date2 = Get-Date -Date "datetime"
$Session = Get-VBRBackupSession | where {($_.Jobname -eq $Job.Name)-and ($_.endtime -ge $Date1) -and ($_.endtime -le $Date2)}
However, be aware that the original code is written for and supposed to work with only one session, so, I'm not sure whether passing array of sessions, instead of single one, would cause any effect on the script.

Thanks.

benrpatterson
Novice
Posts: 4
Liked: never
Joined: Aug 29, 2014 7:38 am
Contact:

Re: SysAdmin Modular Reporting (SAMReport) for Veeam

Post by benrpatterson » Sep 02, 2014 1:58 pm

Thanks Vladimir,

I tested it and it runs, however I'm not sure sure on the numbers. The dates and time below are the start and end time of all our backup and replication jobs.

Is $Job related to group or a VM?

From the Enterprise Manager I can see
Total job runs:29
Successes:13
Warnings:6
Errors:10

From the script i can see
Total Jobs: 701
Success 593
Pending 0
Warning 35
Failed: 71
Unknown: 2

Code: Select all

$Date1 = Get-Date -Date "01AUG2014 17:30"
$Date2 = Get-Date -Date "02AUG2014 08:00"
$Session = Get-VBRBackupSession | where {($_.Jobname -eq $Job.Name)-and ($_.endtime -ge $Date1) -and ($_.endtime -le $Date2)}

v.Eremin
Veeam Software
Posts: 15221
Liked: 1146 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: SysAdmin Modular Reporting (SAMReport) for Veeam

Post by v.Eremin » Sep 02, 2014 2:38 pm

benrpatterson wrote:Is $Job related to group or a VM?
It's related to one job.
benrpatterson wrote:From the script i can see
The reason of such inconsistency might be the fact that the script originally has accepted only single session, and now you're trying to pass an array of those to it. "Total Jobs:" seems to be calculated as number of VMs processed during the specified period of time.

Thanks.

joabec
Lurker
Posts: 2
Liked: never
Joined: Jan 20, 2015 10:31 am
Full Name: Joakim
Contact:

Re: SysAdmin Modular Reporting (SAMReport) for Veeam

Post by joabec » Feb 17, 2015 12:59 pm

Hi,
I'm trying to get a report presenting how much space each backup job takes, not how much space is avalible on the respitory but I can't figure out how to rewrite the Get-BackupStorageStatus.ps1 script to fetch that information. any help will be much appreciated.

Cheers
JB

v.Eremin
Veeam Software
Posts: 15221
Liked: 1146 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: SysAdmin Modular Reporting (SAMReport) for Veeam

Post by v.Eremin » Feb 17, 2015 2:27 pm 1 person likes this post

Are you using Windows-based repository? If so, you can use just MS PS in order to get a folder size, since one backup or backup copy job occupies one folder at the target storage:

Code: Select all

$Size = Get-ChildItem 'Path to your backup job' | Measure-Object -property length -sum 
$Size.sum /1mb
Thanks.

joabec
Lurker
Posts: 2
Liked: never
Joined: Jan 20, 2015 10:31 am
Full Name: Joakim
Contact:

Re: SysAdmin Modular Reporting (SAMReport) for Veeam

Post by joabec » Feb 24, 2015 9:15 am

Thanks v.Eremin
That will do it :-)

Thanks
JB

v.Eremin
Veeam Software
Posts: 15221
Liked: 1146 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: SysAdmin Modular Reporting (SAMReport) for Veeam

Post by v.Eremin » Feb 24, 2015 12:04 pm

You're welcome. If additional assistance is required, let me know. Thanks.

pearlfusion
Lurker
Posts: 1
Liked: never
Joined: Dec 16, 2015 1:49 pm
Full Name: BOURDON Florian
Contact:

Re: SysAdmin Modular Reporting (SAMReport) for Veeam

Post by pearlfusion » Dec 16, 2015 3:34 pm

Hello,

it's possible to exclude type backup called "BackupSync" in module "Get-JobStatusDetails" ??

Thanks a lot.

nullifi
Influencer
Posts: 23
Liked: 5 times
Joined: Aug 05, 2015 1:41 pm
Full Name: Jason Taylor
Contact:

[MERGED] : Scheduled script report similar to vCheck?

Post by nullifi » Feb 09, 2016 3:42 pm

I remember reading about some scheduled task email report script that is similar to vCheck, but not dedicated to VMware exclusively.

I swear I saw it mentioned on these forums somewhere, I thought it was something like sysadm or sys..something.. s, something? Anyone know what I'm talking about?

PTide
Veeam Software
Posts: 4417
Liked: 361 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Scheduled script report similar to vCheck?

Post by PTide » Feb 09, 2016 4:36 pm

Hi,

Are you talking about report provided above?

nullifi
Influencer
Posts: 23
Liked: 5 times
Joined: Aug 05, 2015 1:41 pm
Full Name: Jason Taylor
Contact:

Re: Scheduled script report similar to vCheck?

Post by nullifi » Feb 09, 2016 4:55 pm

That was it, thank you!

Ctek
Service Provider
Posts: 63
Liked: 9 times
Joined: Nov 11, 2015 3:50 pm
Location: Canada
Contact:

Re: SysAdmin Modular Reporting (SAMReport) for Veeam

Post by Ctek » May 25, 2016 2:47 pm

Is this SAMReport still used in Veeam 9? I'd like to know if it's still an active project.

Thanks
VMCE 9 Certified - Systems Administrator

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests