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

Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson »

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: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by veremin »

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: 26
Liked: 9 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson »

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: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by veremin »

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: 26
Liked: 9 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson »

Yes we have done that
Mats
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by veremin »

And still have the issue mentioned above? Let me double check it, then. Thanks!
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by veremin »

Can you post your code here? I've just checked the provided example and everything gone as expected. Thanks!
mats.jansson
Service Provider
Posts: 26
Liked: 9 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson »

$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: 26
Liked: 9 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson »

We can see one fault, one moment
Mats
mats.jansson
Service Provider
Posts: 26
Liked: 9 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson »

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: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by veremin »

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: 26
Liked: 9 times
Joined: Mar 18, 2014 9:13 am
Full Name: Mats

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by mats.jansson »

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: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Add-VBRCloudTenant cmdlet with GatewayPool example

Post by veremin »

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 20 guests