PowerShell script exchange
Post Reply
hansbaars
Novice
Posts: 4
Liked: never
Joined: Apr 25, 2018 4:55 pm
Contact:

All job properties in output file?

Post by hansbaars »

Hello,

Maybe there is someone who already found out how to get output of a VBR Backup job?
Instead of editing job properties I would like to see which VM's are backed up, amount of restore points etcetera.

Anyone wanted to do the same?

Any suggestions are greatly appreciated.

Best regards,
soncscy
Veteran
Posts: 643
Liked: 312 times
Joined: Aug 04, 2019 2:57 pm
Full Name: Harvey
Contact:

Re: All job properties in output file?

Post by soncscy »

Use the search for more specific examples, but you'll want to use Get-VBRJobOptions cmdlet to get the job options (retention, etc).

As for VMs backed up, two ways:

1. Use one of the GetObjectsInJob() methods on a VBR job object from Get-VBRJob. This has some flaws as if you use containers (e.g., tags), it won't resolve the VMs under the tag, just the container itself
2. Use the Get-VBRBackup and Get-VBRRestorePoint cmdlets to see what has been actually backed up. I find this is a lot more reliable as it tells you exactly what you have, and the latter is likely what you're wanting and you can compare it to the desired retention

Play with these a bit and search the forums for examples.
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests