Get-VBRBackupSession members

PowerShell script exchange

Get-VBRBackupSession members

Veeam Logoby odruard » Wed Oct 26, 2011 1:59 pm

Hello,

I'm trying to create some reports using PowerShell, using VeeamBackup 5.0.2.224 (64bit)

I wanted to use applet Get-VBRBackupSession :
Code: Select all
C:\exploit> Get-VBRBackupSession | where-object { $_.name -eq 'TEST_JOB'}

Job Name             State      Start Time             End Time               Result
--------             -----      ----------             --------               ------
TEST_JOB             Stopped    25/10/2011 10:21:54    25/10/2011 10:22:36    Failed
TEST_JOB             Stopped    26/10/2011 10:00:14    26/10/2011 10:00:59    Success

Result is interesting, and I wanted to use Start Time and End Time informations.
However I can't find how to handle them.
Get-Member doesn't list these properties :
Code: Select all
C:\exploit> Get-VBRBackupSession | get-member -membertype Property

   TypeName: Veeam.Backup.Core.CBackupSession

Name     MemberType Definition
----     ---------- ----------
Id       Property   System.Guid Id {get;}
Info     Property   Veeam.Backup.Model.CBackupSessionInfo Info {get;}
JobId    Property   System.Guid JobId {get;}
JobType  Property   Veeam.Backup.Model.EDbJobType JobType {get;}
Logger   Property   Veeam.Backup.Core.XmlLogger Logger {get;}
Name     Property   System.String Name {get;}
Progress Property   Veeam.Backup.Model.CProgressData Progress {get;}
Result   Property   Veeam.Backup.Model.CBaseSessionInfo+EResult Result {get;}
State    Property   Veeam.Backup.Model.CBaseSessionInfo+EState State {get;}

None of these properties are Start Time or End Time.
I tried to use several property names as 'starttime', 'start-time', 'start_time'... without success.

Do you have some idea on this ?

Thanks for any help.
Olivier Druard
odruard
Enthusiast
 
Posts: 30
Liked: never
Joined: Tue Jan 25, 2011 2:12 pm
Full Name: Olivier Druard

Re: Get-VBRBackupSession members

Veeam Logoby Sethbartlett » Wed Oct 26, 2011 2:03 pm

You have to drill down through progress. Example code:

Code: Select all
$Session = Get-VBRBackupSession | ?{$_.name -eq "Job Name"}
$Session[0].Progress.StartTime
$Session[0].Progress.StopTime


Everything you need should be in Progress.
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
Sethbartlett
Expert
 
Posts: 282
Liked: 25 times
Joined: Wed Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett

Re: Get-VBRBackupSession members

Veeam Logoby odruard » Wed Oct 26, 2011 2:22 pm

Nice !
Thanks.

I really need to upgrade my PowerShell skills...

Is there somewhere detailed informations about Veeam applets ?

Olivier Druard
odruard
Enthusiast
 
Posts: 30
Liked: never
Joined: Tue Jan 25, 2011 2:12 pm
Full Name: Olivier Druard

Re: Get-VBRBackupSession members

Veeam Logoby Gostev » Wed Oct 26, 2011 9:31 pm

All cmdlets have built-in help, and there is plenty of samples on these forums!
Gostev
Veeam Software
 
Posts: 21396
Liked: 2350 times
Joined: Sun Jan 01, 2006 1:01 am
Location: Baar, Switzerland

Re: Get-VBRBackupSession members

Veeam Logoby marius roma » Thu May 21, 2015 3:59 pm

I apologize for the very basic question.
How can I get a list of members of .Progress?
Regards
Marius

Sethbartlett wrote:You have to drill down through progress. Example code:

Code: Select all
$Session = Get-VBRBackupSession | ?{$_.name -eq "Job Name"}
$Session[0].Progress.StartTime
$Session[0].Progress.StopTime


Everything you need should be in Progress.
marius roma
Expert
 
Posts: 317
Liked: 3 times
Joined: Wed Feb 01, 2012 12:04 pm
Full Name: Mario

Re: Get-VBRBackupSession members

Veeam Logoby v.Eremin » Fri May 22, 2015 11:53 am

Use Get-Member commandlet:

Code: Select all
$Session[0].Progress | Get-Member


Thanks.
v.Eremin
Veeam Software
 
Posts: 13290
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 9 guests