PowerShell script exchange
Post Reply
scogie
Lurker
Posts: 1
Liked: never
Joined: Jul 12, 2022 8:45 pm
Full Name: Scott Giesbrecht
Contact:

Nutanix, Powershell get next run time

Post by scogie »

Hello All,

I had a script working well with Hyper-v and now that we have moved to Nutanix I am editing it to get me the same data. I am stuck at getting the next run time or the scheduled time. In the past I would have done:

$allJobs = [Veeam.Backup.Core.CBackupJob]::GetAll()
$allJobs.ScheduleOptions.NextRun

The above should show the next run times. However now that I am using Nutanix it is all empty.

ScheduleOptions : Start time: [7/12/2022 2:28:39 AM], Latest run time: [7/12/2022 2:23:39 AM], Timeout for backup completion: [180min], Next run time: [], Retry times on failure: [3], Retry timeout: [10 min],

Does anyone know where I can pull the next run time information from?

Thanks,
Scott
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Nutanix, Powershell get next run time

Post by oleg.feoktistov »

Hi Scott,

Try this approach:

Code: Select all

$jobs = [Veeam.Backup.Core.CBackupJob]::GetAll()
foreach ($job in $jobs) {
  $schedule = Get-VBRJobScheduleOptions
  $job | select Name, @{n='NextRun';e={$schedule.NextRun}}
}
Get-VBRJobScheduleOptions cmdlet should work in the majority of cases including Nutanix.

Thanks,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests