Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Search for Child OUs

$
0
0

Hello,

 

Was wondering if a fresh set of eyes could help me out please. I am trying to search for the child OUs of a parent OU. I am getting the results but I am unable to filter the attributes I need:

 

var parentOU = "Departments"; (this would be an input but I am hard settings this for testing purposes)
var ous = ActiveDirectory.search('OrganizationalUnit',parentOU);

var arrchildOUs = [];

for each (ou in ous){
arrchildOUs.push(ou.organizationalUnits);
}
System.log (arrchildOUs)

 

The results I get are as follows:

[2017-09-27 16:27:03.603] [I] DynamicWrapper (Instance) : [AD_OrganizationalUnit]-[class ch.dunes.ad.object.OU] -- VALUE : #_v2_#,#OU#,#257bfca1-a439-44b7-a9a2-c5a4b593fdb7#,#OU=Finance,OU=Departments,OU=vRA Self Service,DC=demo,DC=co,DC=uk#,

DynamicWrapper (Instance) : [AD_OrganizationalUnit]-[class ch.dunes.ad.object.OU] -- VALUE : #_v2_#,#OU#,#257bfca1-a439-44b7-a9a2-c5a4b593fdb7#,#OU=Sales,OU=Departments,OU=vRA Self Service,DC=demo,DC=co,DC=uk#,

DynamicWrapper (Instance) : [AD_OrganizationalUnit]-[class ch.dunes.ad.object.OU] -- VALUE : #_v2_#,#OU#,#257bfca1-a439-44b7-a9a2-c5a4b593fdb7#,#OU=Support,OU=Departments,OU=vRA Self Service,DC=demo,DC=co,DC=uk#

 

I was hoping to just return the OU names. Any advice greatly appreciated.


Viewing all articles
Browse latest Browse all 6251

Trending Articles



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