Retrieving vRA business groups
A business group in vRA is a subdivision of the users in a tenant. A business group is also named a subtenant in the vRealize Automation API. Each business group must have a reservation of servers, storage, and networks.
To retrieve the vRA business groups of the vsphere.local
tenant, we connect to the vRA server using the cloudadmin@corp.local
account that has the tenant administrator role and the IaaS administrator role in the vsphere.local
tenant. The following code is similar to the code in the preceding section,
Connecting to vRA servers
. First, we will save the server name, username, password, and tenant name in variables, using the following commands:
PowerCLI C:\> $vRAServer = 'vra-01a.corp.local' PowerCLI C:\> $Username = 'cloudadmin@corp.local' PowerCLI C:\> $Password = 'VMware1!' PowerCLI C:\> $Tenant = 'vsphere.local'
We will create a JSON here-string to store the username, password, and tenant...