Tell you what I do, I wrote a little utility called ASEPathFinder, you can get it here:

ASEPathFinder

Just run it and select which protocol path you want (WinNT or LDAP), then click location and select your domain, then click advanced and you can search your domain ...

At the end of dialog, the "path" is returned into the dialog box, then you can just easy cut-and-paste the string into your script, like this:

$object = createobject("<the string>")

And Bob's your uncle ... is this what you meant by "search for groups" etc ? Or you talking about searching in the script itself ?

-Shawn