Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ADSI - any support to access ADSI objects from tcl?

2 views
Skip to first unread message

hadar

unread,
Sep 7, 2001, 5:45:17 AM9/7/01
to
Hello All,
Is there any support to access Active Directory Services Objects (The
Windows 2000 api to it's central Data Base) from within tcl scripts?
I'm sure that I'm not the only one who search for this solution.
I.T. Manager
Netanya Edu.
(to reply remove the removeme from the beginning of my email adress that
will live you with mh@ )
Thanks.


Chin Huang

unread,
Sep 10, 2001, 7:57:02 PM9/10/01
to
In article <9na1od$p0s$1...@news.netvision.net.il>,

hadar <remov...@netanya.ac.il> wrote:
>Is there any support to access Active Directory Services Objects (The
>Windows 2000 api to it's central Data Base) from within tcl scripts?

ADSI exposes a COM automation interface, so a Tcl extension that
enables Tcl scripts to access COM objects should do the trick.
The following example script requires tcom 3.3 available from
http://www.vex.net/~cthuang/tcom/

# List all users in the domain named "MAIN".
package require tcom

set domain "MAIN"
set collection [::tcom::ref getobject "WinNT://$domain"]
$collection -set Filter [list "User"]
::tcom::foreach item $collection {
puts [$item Name]
}

0 new messages