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 »

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: 6035
Liked: 2860 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: List Backup Proxies in Job

Post by tsightler »

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 »

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

Who is online

Users browsing this forum: No registered users and 18 guests