Hi,
I am trying out the excellent UDF's TranslateName() and InContainer() to get away from basing everything off of global group membership.
I am pretty sure I have the OU structure written out right, but InContainer() still reports that my machine is not a member of the OU I am specifying or a child of it... even though I know my machine IS a member.
Using these UDF's, how do I output the name of the OU that it THINKS my machine is in so that I can see where I'm wrong?
Thanks!
Code:
$rc = InContainer ("OU=US-RTP,OU=Admin US-RTP,OU=Clients,DC=na,DC=agrogroup,DC=net", "Computer")
Select
Case $rc[0]=1 $lblThree.text="object is a member of the specified container."
Case $rc[0]=2 $lblThree.text="object is a member of a child container lower in the hierarchy."
Case $rc[0]=0 $lblThree.text="object is NOT a member of this container or a child of this container."
Case $rc[0]=-1 $lblThree.text="InContainer() Error - Invalid input for $NameType "
Case $rc[0]=-2 $lblThree.text="TranslateName() Error"
Case 1 $lblThree.text="Unknown return code"
EndSelect