Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 222846

Re: Retrieving AD policy from business group?

$
0
0

To get the AD Policy name from the business group you can do the following against the vCACCAFEBusinessGroup object. I haven't found a way to get the DN value from the business group yet.

 

//get the vCACCAFEBusinessGroup object(shown under Business Group (Deprecated) in the vRO inventory viewer)
var businessGroup = vCACCAFEEntitesFinder.getBusinessGroup(cafeHost, subTenantId);

//get the custom properties of the business group object 
var properties = businessGroup.customProperties;
for each (var prop in properties){
     if(prop.name == 'ext.policy.activedirectory.system.id'){          //the custom property name matches the AD Policy property name          var adPolicyName = prop.value;           System.log('Found AD Policy assigned to BG with name: ' + adPolicyName);     }
}

 

 

Add in some error handling in case it can't find the policy or if for some strange reason it finds more than one.


Viewing all articles
Browse latest Browse all 222846

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>