PowerShell script exchange
Post Reply
hahasans
Lurker
Posts: 2
Liked: never
Joined: Mar 09, 2021 8:03 am
Full Name: Hasan ŞAHİN
Contact:

Get job in details vm start time, end time, transferred

Post by hahasans »

Image

How to get backup include job detail vm name ,start date, end date and transferred in powershell?
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get job in details vm start time, end time, transferred

Post by oleg.feoktistov »

Hi Hasan,

Since these details are dynamic data, you are after task session info. Here is a sample script for the last job session with local time format:

Code: Select all

$job = Get-VBRJob -Name 'Backup Job'
$session = $job.FindLastSession()
$taskSessions = Get-VBRTaskSession -Session $session
foreach ($task in $taskSessions) {
  $task | select Name, @{n='StartTimeLocal';e={$_.Progress.StartTimeLocal}}, `
  @{n='StopTimeLocal';e={$_.Progress.StopTimeLocal}}, @{n='TransferredSize';e={$_.Progress.TransferedSize}}, `
   @{n='Duration';e={$_.Progress.Duration}}
} 
Most of the details, as you see, are contained under Progress property. So, if you'd need, for example, to change time to UTC or obtain ProcessedSize instead, explore other properties there.

Thanks,
Oleg
hahasans
Lurker
Posts: 2
Liked: never
Joined: Mar 09, 2021 8:03 am
Full Name: Hasan ŞAHİN
Contact:

Re: Get job in details vm start time, end time, transferred

Post by hahasans »

Thanks Oleg.
Minet24
Lurker
Posts: 1
Liked: never
Joined: May 17, 2022 1:15 pm
Contact:

Re: Get job in details vm start time, end time, transferred

Post by Minet24 »

Hi Oleg,

how can i combine this request with the day(s) this job is running?
So for example the job is running on monday and friday and I want a graph with all these info.

Thx
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get job in details vm start time, end time, transferred

Post by oleg.feoktistov »

Hi,

I'm not quite sure how you want this combined data to be formatted as job schedule options and task session details refer to the distinct entities. Do you want to view each job with a schedule and each latest session belonging to a particular job with all the data above or is it something else you are after? Just FYI here I shared powershell script to get job schedule settings depending on job type.

Thanks,
Oleg
wishr
Veteran
Posts: 3077
Liked: 455 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: Get job in details vm start time, end time, transferred

Post by wishr »

Just a quick friendly reminder that you may also use the Workload Protection History report of Veeam ONE to get that data.
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests