If your at Win2k3 SP2, A more efficient way is to use the LDAP_MATCHING_RULE_IN_CHAIN
defined here
http://msdn.microsoft.com/en-us/library/aa746475.aspx
$dn = "<groupdn>"
$filter = "(memberof:1.2.840.113556.1.4.1941:=$dn)"
$ds = new-object System.DirectoryServices.DirectorySearcher([ADSI]"",$filter)
$ds.PageSize = 1000
$ds.FindAll()
Brandon Shell
---------------
Blog:
http://www.bsonposh.com/
PSH Scripts Project:
www.codeplex.com/psobject
K> We have 2003. Thank you - this returns all the nested users! I
K> appreciate it very much! =)
K>
K> --Kirgan
K>