List Backup Proxies in Job

PowerShell script exchange

List Backup Proxies in Job

Veeam Logoby jevao » Fri Jun 06, 2014 2:28 pm

Hello,
Using a snippet from powershell-f26/get-backup-replica-job-options-t17509.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.
jevao
Enthusiast
 
Posts: 29
Liked: 3 times
Joined: Fri Oct 28, 2011 11:38 pm
Full Name: James Collison

Re: List Backup Proxies in Job

Veeam Logoby tsightler » Sat 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.
tsightler
Veeam Software
 
Posts: 4768
Liked: 1737 times
Joined: Fri Jun 05, 2009 12:57 pm
Full Name: Tom Sightler

Re: List Backup Proxies in Job

Veeam Logoby jevao » Mon Jun 09, 2014 7:52 pm

Thank you very much! I upgraded to Powershell 3.0 and problem is solved.
jevao
Enthusiast
 
Posts: 29
Liked: 3 times
Joined: Fri Oct 28, 2011 11:38 pm
Full Name: James Collison


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 3 guests