PowerShell script exchange
Post Reply
jevao
Enthusiast
Posts: 29
Liked: 3 times
Joined: Oct 28, 2011 11:38 pm
Full Name: James Collison
Contact:

List Backup Proxies in Job

Post by jevao » Jun 06, 2014 2:28 pm

Hello,
Using a snippet from http://forums.veeam.com/powershell-f26/ ... 17509.html I am trying to list the source backup proxies in my jobs using the code:

asnp VeeamPSSnapin
Get-VBRJob | ? {$_.jobtype -eq "Backup"} | Select-Object -Property @{N="Job Name";E={$_.name}}, @{N="VMs";E={$_.GetViOijs().name}}, @{N="Source Proxies";E={$_.GetSourceViProxies().name}}, @{N="Target repository"; E={$_.GetTargetRepository().name}} | Format-Table

I get output for "Job Name" and "Target Repository", But only blank output for "Source Proxies" and "VMs". I do not think it is a formatting issue, because I get blank output even if I try to access the object by itself. I use multple source backup proxies in my jobs. Thanks for any help.

tsightler
VP, Product Management
Posts: 5402
Liked: 2229 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: List Backup Proxies in Job

Post by tsightler » Jun 07, 2014 12:45 am

I'm not able to reproduce this as both Source Proxies and Target Repository is properly populated in my testing using your exact code snippet. Note that mulitple proxies do return an array. Is this definitely B&R V7? Also, have you updated your Powershell components as I've seen some weird problems with older Powershell 1.0 and 2.0 environments not populating certain variables.

jevao
Enthusiast
Posts: 29
Liked: 3 times
Joined: Oct 28, 2011 11:38 pm
Full Name: James Collison
Contact:

Re: List Backup Proxies in Job

Post by jevao » Jun 09, 2014 7:52 pm

Thank you very much! I upgraded to Powershell 3.0 and problem is solved.

Post Reply

Who is online

Users browsing this forum: Vek17 and 4 guests