PowerShell script exchange
Post Reply
mats.jansson
Service Provider
Posts: 18
Liked: 3 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson » Jan 24, 2019 8:38 am

Hi
We are using PowerShell script when creating new Cloud Connect customers.
We are having problem to add gatewaypool to new tenants.
Anyone having example how to add gatewaypool to a cloud tenant?
Mats

veremin
Product Manager
Posts: 17047
Liked: 1470 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by veremin » Jan 24, 2019 10:04 am

Don't have CC environment at the moment, but the following script should do the trick:

Code: Select all

Asnp VeeamPSSnapin
$Tenant = Get-VBRCloudTenant -name "Name of your Tenant"
$CloudGateway = Get-VBRCloudGatewayPool -name "Name of your cloud gateway pool"
Set-VBRCloudTenant -CloudTenant $Tenant -GatewaySelectionType GatewayPool -GatewayPool $GatewayPool
Thanks!

mats.jansson
Service Provider
Posts: 18
Liked: 3 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson » Jan 24, 2019 10:26 am

Still not working

We are using Add-VBRCloudTenant

Missing an argument for parameter 'GatewayPool'. Specify a parameter of type 'Veeam.Backup.PowerShell.Infos.VBRCloudGatewayPool[]' and try again
Mats

veremin
Product Manager
Posts: 17047
Liked: 1470 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by veremin » Jan 24, 2019 10:58 am

Have you tried to specify a value for it?

Code: Select all

$CloudGateway = Get-VBRCloudGatewayPool -name "Name of your cloud gateway pool"
Add-VBRCloudTenant <your code> -GatewaySelectionType GatewayPool -GatewayPool $GatewayPool
Thanks!

mats.jansson
Service Provider
Posts: 18
Liked: 3 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson » Jan 24, 2019 11:08 am

Yes we have done that
Mats

veremin
Product Manager
Posts: 17047
Liked: 1470 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by veremin » Jan 24, 2019 11:12 am

And still have the issue mentioned above? Let me double check it, then. Thanks!

veremin
Product Manager
Posts: 17047
Liked: 1470 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by veremin » Jan 24, 2019 11:26 am

Can you post your code here? I've just checked the provided example and everything gone as expected. Thanks!

mats.jansson
Service Provider
Posts: 18
Liked: 3 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson » Jan 24, 2019 11:32 am

$CloudGateway = Get-VBRCloudGatewayPool -name "Gateway_Pool01"

Add-VBRCloudTenant -Name $VBR_Tenant_Username -Password $VBR_Tenant_Password -Description $VBR_Tenant_Description -Resources $VBR_Cloud_Repository -EnableThrottling -ThrottlingValue $VBR_Cloud_ThrottlingMbit -ThrottlingUnit MbitPerSec -GatewaySelectionType GatewayPool -GatewayPool $GatewayPool | Out-Null

Thanks
Mats

mats.jansson
Service Provider
Posts: 18
Liked: 3 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson » Jan 24, 2019 11:34 am

We can see one fault, one moment
Mats

mats.jansson
Service Provider
Posts: 18
Liked: 3 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson » Jan 24, 2019 11:42 am

Still not working

$GatewayPool = Get-VBRCloudGatewayPool -name "Gateway_Pool01"

Add-VBRCloudTenant -Name $VBR_Tenant_Username -Password $VBR_Tenant_Password -Description $VBR_Tenant_Description -Resources $VBR_Cloud_Repository -EnableThrottling -ThrottlingValue $VBR_Cloud_ThrottlingMbit -ThrottlingUnit MbitPerSec -GatewaySelectionType GatewayPool -GatewayPool $GatewayPool | Out-Null

Thanks
Mats

veremin
Product Manager
Posts: 17047
Liked: 1470 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by veremin » Jan 24, 2019 12:21 pm

The code works in my environment without any issues. What exact issue do you see - the one mentioned above (regarding missing parameter)? Thanks!

mats.jansson
Service Provider
Posts: 18
Liked: 3 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson » Jan 24, 2019 3:08 pm

It´s working now after we added Get-VBRCloudGatewayPool and reloaded the main script.

Code: Select all

$GatewayPool = Get-VBRCloudGatewayPool -name "Gateway_Pool01"
Add-VBRCloudTenant -Name $VBR_Tenant_Username -Password $VBR_Tenant_Password -Description $VBR_Tenant_Description -Resources $VBR_Cloud_Repository -EnableThrottling -ThrottlingValue $VBR_Cloud_ThrottlingMbit -ThrottlingUnit MbitPerSec -GatewaySelectionType GatewayPool -GatewayPool $GatewayPool | Out-Null
Thanks for your help
Mats

veremin
Product Manager
Posts: 17047
Liked: 1470 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by veremin » Jan 24, 2019 3:14 pm

Glad to hear my input was helpful. If you need any other help with scripting, let me know. Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests