Create a gist now

Instantly share code, notes, and snippets.

Create vRA Tenant, Directory and Assign Admins
New-vRATenant -Name Tenant30 -Description "This is Tenant30" -URLName Tenant30 -ContactEmail admin.user30@tenant01.local -ID Tenant30
$JSON = @"
{
"name" : "Tenant30",
"description" : "Tenant30",
"alias" : "",
"type" : "AD",
"userNameDn" : "CN=tenant30svc,OU=Users,OU=Tenant30,OU=Tenants,DC=vrademo,DC=local",
"groupBaseSearchDn" : "OU=Tenant30,OU=Tenants,DC=vrademo,DC=local",
"password" : "P@ssword!",
"url" : "ldap://dc01.vrademo.local:389",
"userBaseSearchDn" : "OU=Tenant30,OU=Tenants,DC=vrademo,DC=local",
"domain" : "vrademo.local",
"domainAdminUsername" : "",
"domainAdminPassword" : "",
"subdomains" : [ "" ],
"groupBaseSearchDns" : [ "OU=Tenant30,OU=Tenants,DC=vrademo,DC=local" ],
"userBaseSearchDns" : [ "OU=Tenant30,OU=Tenants,DC=vrademo,DC=local" ],
"certificate" : "",
"trustAll" : true,
"useGlobalCatalog" : false
}
"@
$JSON | New-vRATenantDirectory -ID Tenant30
Add-vRAPrincipalToTenantRole -TenantId Tenant30 -PrincipalId tenantadmin30@vrademo.local -RoleId CSP_TENANT_ADMIN
Add-vRAPrincipalToTenantRole -TenantId Tenant30 -PrincipalId tenantinfraadmin30@vrademo.local -RoleId COM_VMWARE_IAAS_IAAS_ADMINISTRATOR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment