PowerShell script exchange
Post Reply
marius roma
Veteran
Posts: 459
Liked: 5 times
Joined: Feb 01, 2012 12:04 pm
Full Name: Mario
Contact:

Getting the "real" start time for a session

Post by marius roma »

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?
Regards
Marius
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin »

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.

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests