PowerShell script exchange


Veeam Logoby marius roma » Fri Jun 24, 2016 3:30 pm

I am using a script to list all the proxyies used by all my backup jobs.
The code looks like:
Code: Select all
Asnp VeeamPSSnapin
foreach ($Job in (Get-VBRJob | where {$_.JobType -eq "Backup"}))
    foreach ($prox in ($job | get-vbrjobproxy)) {

If a job is set to use one or more proxyies I see the name of the job and the list of the proxyies.
If the job is confnggured for automatic selection I get an orange message that sounds like "WARNING: Automatic selection is enabled." and the list af all the available proxyies.
How can I remove the orange message or, even better, intercept it and manage inside an (if automatic selection is enabled, then ...)?
marius roma
Posts: 359
Liked: 3 times
Joined: Wed Feb 01, 2012 12:04 pm
Full Name: Mario

Re: Get-VBRJobProxy

Veeam Logoby v.Eremin » Mon Jun 27, 2016 5:27 am 1 person likes this post

You can use the following script in order to list only jobs for which proxy automatic selection is disabled. Proxy names are listed as well:

Code: Select all
asnp VeeamPSSnapin
$Report = @()
foreach ($Job in (Get-VBRJob | where {$_.JobType -eq "Backup" -and $ -eq $False}))
$ProxyInfo = New-Object psobject
$ProxyInfo | Add-Member -MemberType NoteProperty -Name "JobName" -Value $Job.Name
$ProxyInfo | Add-Member -MemberType NoteProperty -Name "AutoDetect" -Value $
$ProxyInfo | Add-Member -MemberType NoteProperty -Name "ProxyName" -Value (Get-VBRJobProxy -Job $Job).name
$Report += $ProxyInfo

Veeam Software
Posts: 14023
Liked: 1051 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Return to PowerShell

Who is online

Users browsing this forum: wyu and 1 guest