Extracting e-mail accounts from A.D.
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Extracting e-mail accounts from A.D.

 
Post new topic   Reply to topic    Windows Server Forum Index -> Programming
Author Message
steve
Guest





Posted: Thu Jan 06, 2005 9:06 pm    Post subject: Extracting e-mail accounts from A.D. Reply with quote

Hi All!

I am looking for some vbscript example of code that extracts e-mail accounts
(Exchange 2000 in a Windows 2000 environment) from Active Directory .

Where can I find some example?

Thank you!
Back to top
Rudy Steyaert
Guest





Posted: Thu Jan 06, 2005 11:43 pm    Post subject: Re: Extracting e-mail accounts from A.D. Reply with quote

Can you be more specific about you want to accomplish ?

"steve" <simpsonst3@comcast.net> wrote in message
news:%23kd$zFA9EHA.2600@TK2MSFTNGP09.phx.gbl...
Quote:
Hi All!

I am looking for some vbscript example of code that extracts e-mail
accounts
(Exchange 2000 in a Windows 2000 environment) from Active Directory .

Where can I find some example?

Thank you!


Back to top
steve
Guest





Posted: Fri Jan 07, 2005 1:20 am    Post subject: Re: Extracting e-mail accounts from A.D. Reply with quote

Sure!

The script should query the whole A.D. and for every User account in my A.D.
it would extract the user's e-mail address (if any) (the SMTP e-mail
address) and write it to a text file.

Thanks!!


john.whatever@myorg.com the list would show
"Rudy Steyaert" <Rudy_Steyaert@hotmail.com> wrote in message
news:esGLwbB9EHA.2572@tk2msftngp13.phx.gbl...
Quote:
Can you be more specific about you want to accomplish ?

"steve" <simpsonst3@comcast.net> wrote in message
news:%23kd$zFA9EHA.2600@TK2MSFTNGP09.phx.gbl...
Hi All!

I am looking for some vbscript example of code that extracts e-mail
accounts
(Exchange 2000 in a Windows 2000 environment) from Active Directory .

Where can I find some example?

Thank you!




Back to top
Rudy Steyaert
Guest





Posted: Fri Jan 07, 2005 6:00 pm    Post subject: Re: Extracting e-mail accounts from A.D. Reply with quote

As a start, here is an example of some code I use on an ASP-page.

<%
Set Conn=Server.CreateObject("ADODB.Connection")
Set Com=Server.CreateObject("ADODB.Command")
Set Rs=Server.CreateObject("ADODB.Recordset")
Conn.Provider="ADsDSOObject"
Conn.Open "ADs Provider"
Com.ActiveConnection=Conn
Com.CommandText="<LDAP://DC=YOURDOMAIN,DC=YOURDOMAINSUFFIX>;(&(objectCategory=user));Displayname,Mail,Proxyaddresses;subtree"
Set Rs = Com.Execute
While (not Rs.EOF)
Response.Write (Rs.Fields("Displayname").value&"<BR>")
ProxyAddresses=Rs.Fields("ProxyAddresses").value
If not IsNull(ProxyAddresses) then
for each Address in ProxyAddresses
Response.Write (Address)&","
next
response.Write("<BR>")
end If
Rs.movenext
Wend
Rs.Close
Conn.Close
Set Rs=Nothing
Set Com=Nothing
Set Conn=Nothing
%>

"steve" <simpsonst3@comcast.net> wrote in message
news:uJoznTC9EHA.3596@TK2MSFTNGP12.phx.gbl...
Quote:
Sure!

The script should query the whole A.D. and for every User account in my
A.D.
it would extract the user's e-mail address (if any) (the SMTP e-mail
address) and write it to a text file.

Thanks!!


john.whatever@myorg.com the list would show
"Rudy Steyaert" <Rudy_Steyaert@hotmail.com> wrote in message
news:esGLwbB9EHA.2572@tk2msftngp13.phx.gbl...
Can you be more specific about you want to accomplish ?

"steve" <simpsonst3@comcast.net> wrote in message
news:%23kd$zFA9EHA.2600@TK2MSFTNGP09.phx.gbl...
Hi All!

I am looking for some vbscript example of code that extracts e-mail
accounts
(Exchange 2000 in a Windows 2000 environment) from Active Directory .

Where can I find some example?

Thank you!






Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Programming All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB