There's an ADSI example in the Clarence's ADSI FAQ.
Win32 Scripting [Clarence Washington]
http://cwashington.netreach.net
http://cwashington.netreach.net/script_repository/repository.asp
http://cwashington.netreach.net/script_repository/query.asp
http://cwashington.netreach.net/main_site/downloads
http://cwashington.netreach.net/script_repository/faqs.asp?topic=wmifaq
===> http://cwashington.netreach.net/script_repository/faqs.asp?topic=adsifaq
You can also (as Dominic speculated) use WMI as well, though I don't have a link to an example...
Both ADSI and WMI are separate downloads/installs for all but Win2000 (and the upcoming WinME)...
--
Michael Harris
MVP Scripting
This may (or may not) be possible in WMI. I haven't seen it done in standard
script though.
--
Dominic