Did you try doing it in VBS? Anytime I try converting VBS code, I always verify that the original VBS I am trying to convert works.

Is this NT4 or AD? There is a LDAP method too.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.