Getting the "real" start time for a session

PowerShell script exchange

Getting the "real" start time for a session

Veeam Logoby marius roma » Fri Dec 04, 2015 3:23 pm

I am collecting statistical information about jobs and sessions.
With "Get-VBRBackupSession" I can get a $session object with several properties, including start time and end time.
From reports I see that a session can start let's say at 19:00, but if the server is busy the first VM will be processed at 22:45.
How can extract the real start time of a gicen session, 22:45 in my example?
marius roma
Posts: 359
Liked: 3 times
Joined: Wed Feb 01, 2012 12:04 pm
Full Name: Mario

Re: Getting the "real" start time for a session

Veeam Logoby v.Eremin » Fri Dec 04, 2015 3:40 pm

Check the example that includes just one job and its latest session:

Code: Select all
Asnp VeeamPSSnapin
$Job = Get-VBRJob -Name "Name of a Job"
$LastSession = $Job.FindLastSession()
$LastSession.GetTaskSessions() | select name, {$_.Progress.StartTime}

You can modify the provided example further in order for it to cover all backup sessions and their respective task sessions.

Veeam Software
Posts: 14023
Liked: 1051 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 1 guest