PowerShell script exchange
Post Reply
CreatoX
Novice
Posts: 7
Liked: never
Joined: Aug 09, 2018 12:17 pm

Getting Status for Objects in a Job

Post by CreatoX »

Hi,

Trying to figure out a way of getting the Status of every Object in a Job.
As in the GUI:

Image

When using:
(Get-VBRJob -name $jobName).GetObjectsInJob()

All objects are returned. But nowhere I can find the Last Status.
It's important to get de Object status and not the Job overall status.
Some help appreciated. Thank you.
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Getting Status for Objects in a Job

Post by veremin » 1 person likes this post

- Get job session, using Get-VBRBackupSession cmdlet
- Get task session, using Get-VBRTaskSession cmdlet
- Check task session status (should be information you're looking for)

Thanks!
CreatoX
Novice
Posts: 7
Liked: never
Joined: Aug 09, 2018 12:17 pm

Re: Getting Status for Objects in a Job

Post by CreatoX »

This is indeed what I was looking for. Thank you so much!
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Getting Status for Objects in a Job

Post by veremin »

You're welcome. Originally you tried to query list of job source objects. Those objects are just references to virtual infrastructure entities, such as VMs, containers, folders, hosts, etc. (depending on what is selected as job source).

Those objects don't have any connection with task session status, thus, you didn't find needed information.

Glad to hear you're up and running now, though. Should other help be needed, let us know.

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests