Itemize AD group

Started by Orionbelt, March 16, 2014, 01:37:09 AM

Previous topic - Next topic

Orionbelt

hi all,
  I am trying to display Certain ou but its showing me full ldap ou. I would like to just get OU ..
For eg.
LDAP://myserver/ou=mytopou,dc=mysubdomain,dc=mydomain"

I just like to get MYTOPOU name display...also is there way to get querry two ldap querry and dispaly to one.
for eg.
LDAP://Microsoft/ou=mytopou,dc=mysubdomain,dc=mydomain"
LDAP://Microsoft/ou=myUSou,dc=mysubdomain,dc=mydomain"


Here what i have.
=============================================
If WinMetrics(-2) == 3 Then AddExtender("WWADS64I.DLL") ; 64-bit
Else AddExtender("WWADS44I.DLL") ; 32-bit

; Search this ou and all objects below it.
sStarPath = "LDAP://Microsoft/ou=mytopou,dc=mysubdomain,dc=mydomain"

; objectCategory makes the search faster.
sFilter = "(&(objectCategory=organizationalunit)(ou=*))"

; Search
MyOuPaths = dsFindPath(sStarPath, sFilter)

OuExampleFormat=`WWWDLGED,6.1`

OuExampleCaption=`ALL OU`
OuExampleX=057
OuExampleY=094
OuExampleWidth=178
OuExampleHeight=126
OuExampleNumControls=003
OuExampleProcedure=`DEFAULT`
OuExampleFont=`DEFAULT`
OuExampleTextColor=`DEFAULT`
OuExampleBackground=`DEFAULT,DEFAULT`
OuExampleConfig=0

OuExample001=`069,105,036,012,PUSHBUTTON,DEFAULT,"OK",1,1,32,DEFAULT,DEFAULT,DEFAULT`
OuExample002=`005,021,164,074,ITEMBOX,MyOuPaths,DEFAULT,DEFAULT,2,256,DEFAULT,DEFAULT,DEFAULT`
OuExample003=`005,011,074,008,STATICTEXT,DEFAULT,"My Organizatrional Units:",DEFAULT,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=Dialog("ShowOU")

=============================================================

Orionbelt

i am able to resolve but adding code after adsearch

For i=1 To ItemCount(MyOuPaths,@TAB)
           TmpGroup=ItemExtract(i,MyOuPaths,@TAB)
           x=StrIndex(TmpGroup,"=",1,@FWDSCAN)+1
           y=StrIndex(TmpGroup,",",1,@FWDSCAN)-1
           TmpGroup=StrSub(TmpGroup,x,y-x+1)
           MyOuPaths=ItemReplace(TmpGroup,i,MyOuPaths,@TAB)
       Next

td

You can use the 'dsGetProperty' function to get the 'ou' property of each ou full LDAP path.
Code (winbatch) Select
strOu = dsGetProperty(strOuPathHere, "ou")
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade