Extract all domains from active directory ODNode object

I'd like to obtain all available network domains which are bound to my active directory server TEST.

from command-line I use odutil show nodenames which retrieves :

Code Block
Name State Refs Type External Locked Hidden
--------------------------------------------- ------ ---- ------------ -------- ------ ------
/Active Directory Online 3 X X
/Active Directory/TEST 10
/Active Directory/TEST/All Domains Online 4 Virtual node
/Active Directory/TEST/Global Catalog Online 6 Virtual node X
/Active Directory/TEST/domain.com Online 6 Virtual node X
/Configure Online 2 X X
/Contacts Online 3
/LDAPv3 Online 1 X X
/Local Online 2 X X
/Local/Default Online 36 X
/Search Online 19


I only care about the Active directory based nodes since I'd like to list all domains attached to those nodes only.

in the case above both /Active Directory/myserver/Global Catalog and /Active Directory/myserver/domain.com are marked as hidden.

Unfortunately, I couldn't find a way to get nodes which are marked as hidden from the command-line output. Perhaps anybody knows how ?

My Code to iterate those nodes is :
Code Block
ODNode * node = [ODNode nodeWithSession:[ODSession defaultSession]
type:kODNodeTypeAuthentication error:nil];
NSArray * subnodes = (bridge NSArray *)ODNodeCopySubnodeNames((bridge ODNodeRef)node, NULL);

which retrieved only the non-hidden nodes : /Active Directory/myserver/All Domains.

Thanks !

Extract all domains from active directory ODNode object
 
 
Q