PowerShell script exchange
Post Reply
efd121
Enthusiast
Posts: 46
Liked: 2 times
Joined: Aug 07, 2015 8:45 pm
Full Name: David Engler
Contact:

Set-VBRViProxy adding datastore list

Post by efd121 »

Struggling to find the correct format to add a list of datastores to a proxy using Set-VBRViProxy -Datastore and I'm hoping someone can point me in the right direction.

I have tried setting a variable to an array $datastores = @("fwdvx_01","fwdvx_02","fwdvx_03","fwdvx_04","fwdvx_05"). I have also tried setting the list directly both with and without quotes
'fwdvx_01,fwdvx_02,fwdvx_03,fwdvx_04'
fwdvx_01,fwdvx_02,fwdvx_03,fwdvx_04
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Set-VBRViProxy adding datastore list

Post by oleg.feoktistov »

Hi David,

As described in this article, -Datastore parameter accepts objects of VBRViDatastore type. So, you need to obtain datastores you want to connect to the proxy first:

Code: Select all

$server = Get-VBRServer -Server 'esxi-host'
$datastores = Find-VBRViDatastore -Server $server
$proxy = Get-VBRViProxy -Name 'VMware Proxy'
Set-VBRViProxy -Proxy $proxy -datastore $datastores
Thanks,
Oleg
efd121
Enthusiast
Posts: 46
Liked: 2 times
Joined: Aug 07, 2015 8:45 pm
Full Name: David Engler
Contact:

Re: Set-VBRViProxy adding datastore list

Post by efd121 »

Thanks for the quick reply, that is working for me
Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests