If the domain is localdomain.com, then the base is DC=localdomain,DC=com -----Original Message----- From: John Tolmachoff (Lists) [mailto:johnlist@xxxxxxxxxxxxxxxxxxx] Sent: Thursday, June 24, 2004 2:59 PM To: [ExchangeList] Subject: [exchangelist] RE: Making list of e-mail addresses http://www.MSExchange.org/ Oh great, I forgot how to do the dc= addressing. If the domain is localdomain.com, and the first DC is dc1, the syntax is Dc=com,dc=localdomain,dc=dc1 correct? John Tolmachoff Engineer/Consultant/Owner eServices For You > -----Original Message----- > From: Michael B. Smith [mailto:michael@xxxxxxxxxx] > Sent: Thursday, June 24, 2004 11:35 AM > To: [ExchangeList] > Subject: [exchangelist] RE: Making list of e-mail addresses > > http://www.MSExchange.org/ > > I think your LDAP string, specifically msExchHomeServerName, is > probably incorrect. > > This is a whole lot simpler, if you don't need pretty formatting: > > Download adfind from www.joeware.net, then: > > adfind -b dc=brnets,dc=local -f "(proxyaddresses=smtp:*)" > proxyAddresses > > Obviously, replace the base with your base. > > -----Original Message----- > From: John Tolmachoff (Lists) [mailto:johnlist@xxxxxxxxxxxxxxxxxxx] > Sent: Thursday, June 24, 2004 2:25 PM > To: [ExchangeList] > Subject: [exchangelist] Making list of e-mail addresses > > http://www.MSExchange.org/ > > I am trying to make a list of users e-mail addresses. > > I followed the article > http://www.msexchange.org/tutorials/Creating_a_list_of_Users_and_their > _e > mail > _addresses_in_Exchange_2000_2.html > > And I ended up with this file: > ___________________________________________________________ > Dim rootDSE, domainObject > Set rootDSE=GetObject("LDAP://RootDSE";) > DomainContainer = rootDSE.Get("defaultNamingContext") > Set fs = CreateObject ("Scripting.FileSystemObject") Set userFile = > fs.CreateTextFile ("c:\users.csv") > > Set conn = CreateObject("ADODB.Connection") conn.Provider = > "ADSDSOObject" > conn.Open "ADs Provider" > > ldapStr = "<LDAP://"; & DomainContainer & ">;(&(&(& (mailnickname=*) (| > (&(objectCategory=person)(objectClass=user)(msExchHomeServerName=/o=Qu > es > tCom > p/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=SRV3)) > ))))" > > Set rs = conn.Execute(ldapStr) > > While Not rs.EOF > Set oUser = GetObject (rs.Fields(0).Value) userFile.Write > oUser.displayName & "," & _ > oUser.sAMAccountName & "," & oUser.userprincipalname & "," > for each email in oUser.proxyAddresses > userFile.Write email & "," > next > userFile.WriteLine "" > rs.MoveNext > Wend > ______________________________________________________ > > However, when I run it, it keep getting a Windows Scripting Host error: > Script: C:\users.vbs > Line: 13 > Char: 1 > Error: One or more errors occurred during processing of command > Code: 80040E14 > Source: Provider > > Can some one explain what the error is and how to fix? > > John Tolmachoff > Engineer/Consultant/Owner > eServices For You > > > > ------------------------------------------------------ > List Archives: > http://www.webelists.com/cgi/lyris.pl?enter=exchangelist > Exchange Newsletters: http://www.msexchange.org/pages/newsletter.asp > Exchange FAQ: http://www.msexchange.org/pages/larticle.asp?type=FAQ > ------------------------------------------------------ > Other Internet Software Marketing Sites: > World of Windows Networking: http://www.windowsnetworking.com Leading > Network Software Directory: http://www.serverfiles.com > No.1 ISA Server Resource Site: http://www.isaserver.org Windows > Security Resource Site: http://www.windowsecurity.com/ Network Security Library: > http://www.secinf.net/ Windows 2000/NT Fax Solutions: > http://www.ntfaxfaq.com > ------------------------------------------------------ > You are currently subscribed to this MSEXchange.org Discussion List as: > michael@xxxxxxxxxx To unsubscribe visit > http://www.webelists.com/cgi/lyris.pl?enter=exchangelist > > > > ------------------------------------------------------ > List Archives: > http://www.webelists.com/cgi/lyris.pl?enter=exchangelist > Exchange Newsletters: http://www.msexchange.org/pages/newsletter.asp > Exchange FAQ: http://www.msexchange.org/pages/larticle.asp?type=FAQ > ------------------------------------------------------ > Other Internet Software Marketing Sites: > World of Windows Networking: http://www.windowsnetworking.com Leading > Network Software Directory: http://www.serverfiles.com > No.1 ISA Server Resource Site: http://www.isaserver.org Windows > Security Resource Site: http://www.windowsecurity.com/ Network > Security Library: http://www.secinf.net/ Windows 2000/NT Fax > Solutions: http://www.ntfaxfaq.com > ------------------------------------------------------ > You are currently subscribed to this MSEXchange.org Discussion List as: > johnlist@xxxxxxxxxxxxxxxxxxx > To unsubscribe visit http://www.webelists.com/cgi/lyris.pl?enter=exchangelist ------------------------------------------------------ List Archives: http://www.webelists.com/cgi/lyris.pl?enter=exchangelist Exchange Newsletters: http://www.msexchange.org/pages/newsletter.asp Exchange FAQ: http://www.msexchange.org/pages/larticle.asp?type=FAQ ------------------------------------------------------ Other Internet Software Marketing Sites: World of Windows Networking: http://www.windowsnetworking.com Leading Network Software Directory: http://www.serverfiles.com No.1 ISA Server Resource Site: http://www.isaserver.org Windows Security Resource Site: http://www.windowsecurity.com/ Network Security Library: http://www.secinf.net/ Windows 2000/NT Fax Solutions: http://www.ntfaxfaq.com ------------------------------------------------------ You are currently subscribed to this MSEXchange.org Discussion List as: michael@xxxxxxxxxx To unsubscribe visit http://www.webelists.com/cgi/lyris.pl?enter=exchangelist