PowerShell script exchange
Post Reply
Dario.Palmisano
Enthusiast
Posts: 31
Liked: 2 times
Joined: Nov 11, 2013 7:22 am
Full Name: Dario Palmisano
Contact:

How to get the repository a bk job uses

Post by Dario.Palmisano »

Hello,

I would like to be able to extract, with powershell, the repository a backup job uses, but till now unsuccessfully.

I wonder if is it possible and how?

Thanks and regards

Dario
veremin
Product Manager
Posts: 20389
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: How to get the repository a bk job uses

Post by veremin »

Hi, Dario,

Try the following example:

Code: Select all

$Job = Get-VBRJob -name "Name of your Backup Job"
Get-VBRBackupRepository | where {$_.id -eq $Job.Info.TargetRepositoryId} | select name
Thanks.
Dario.Palmisano
Enthusiast
Posts: 31
Liked: 2 times
Joined: Nov 11, 2013 7:22 am
Full Name: Dario Palmisano
Contact:

Re: How to get the repository a bk job uses

Post by Dario.Palmisano » 1 person likes this post

It works great!

Thanks
veremin
Product Manager
Posts: 20389
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: How to get the repository a bk job uses

Post by veremin »

You're welcome. Should other help be needed, don't hesitate to let us know.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 16 guests