Get Job backup Target directory

PowerShell script exchange

Get Job backup Target directory

Veeam Logoby normunds » Thu Jan 19, 2017 9:01 am

Hi!

Veeam B&R version 9.5.0.711
Command
Code: Select all
(Get-VBRJob -Name $jobname).TargetDir
does not return "D:\FolderName" anymore. I get only
Code: Select all
  IsVbm
  -----
  False

Is this a bug or something is not correct with my local powershell? I think this issue is after B&R 9.5 upgrade.
Any suggestions?
normunds
Novice
 
Posts: 5
Liked: never
Joined: Wed Nov 26, 2014 12:54 pm
Full Name: Normunds

Re: Get Job backup Target directory

Veeam Logoby tdewin » Thu Jan 19, 2017 9:35 am 1 person likes this post

Might consider
Code: Select all
$job = (Get-VBRJob -Name $jobname)
$job.GetTargetRepository()
tdewin
Veeam Software
 
Posts: 1091
Liked: 380 times
Joined: Fri Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin

Re: Get Job backup Target directory

Veeam Logoby normunds » Thu Jan 19, 2017 10:28 am

tdewin wrote:Might consider
Code: Select all
$job = (Get-VBRJob -Name $jobname)
$job.GetTargetRepository()


Thank you! I got correct result with:
Code: Select all
($job.GetTargetRepository()).FriendlyPath

But same issue with:
Code: Select all
($job.GetTargetRepository()).Path

Based on my previous powershell experience, this command doesn't work as expected
Code: Select all
($job.GetTargetRepository()).Path
normunds
Novice
 
Posts: 5
Liked: never
Joined: Wed Nov 26, 2014 12:54 pm
Full Name: Normunds

Re: Get Job backup Target directory

Veeam Logoby v.Eremin » Thu Jan 19, 2017 11:22 am

Not sure what's wrong in your case. For me both parameters (.Path, .FriendlyPath) work flawlessly. Anyway, glad to hear you've found the way to achieve your goal.
v.Eremin
Veeam Software
 
Posts: 13558
Liked: 1006 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 14 guests