Benny, Allen,

Thanks for the suggestions.

Allen,

Your code only gives me errors. Dunno why but I cannot get it to work.

Benny,

Works sort of. I get al users but I cannot figure our how to modify it to have it accept an OU and get all users from it and it's sub OU's.



I got something going with the InContainer() and TranslateName() UDF's
Now I just need to get it going with a array of all users (I can get all users easily), let it step trough the array(also easy) and do it's magic (not that easy to have InConatiner accept a username. At least I do not know how). The challenges just keep on coming. Educational yes but also frustrating Google is my friend today and maybe Howard will stop by with a suggestion on how to change his UDF.

 Code:
Break on

$countries = "Belgium", "Corporate", "France", "Germany", "Italy", "Spain", "Switzerland", "The Netherlands"

For Each $country in $countries
	$rc = InContainer("OU=" + $country + ",OU=Company_OU,DC=Domain,DC=Domain,DC=Ext", "User")
	If $rc[0] = "1" Or $rc[0] = "2"
		? "Yep this user is a member of the exact OU or a sub OU " $country
	Else
		? "Nope user is NOT a member of the exact OU Or a sub OU " $country
	EndIf
Next

Sleep 3
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.