If you need to cross OU's, you may want to iterate through OU's and for each OU follow that path. Might be helpful to spit out some information linking the addresses to the user's samaccountname or UPN as well, just for linking the user to the address.
Al -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kern, Tom Sent: Wednesday, May 26, 2004 10:41 AM To: [EMAIL PROTECTED] Subject: RE: [ActiveDir] Can LDP be used to create email report of all users in AD? i use this- 'Global variables Dim Container Dim OutPutFile Dim FileSystem 'Initialize global variables Set FileSystem = WScript.CreateObject("Scripting.FileSystemObject") Set OutPutFile = FileSystem.CreateTextFile("virtual.txt", True) Set Container=GetObject("LDAP://ou=ExchUsers,DC=childdomain,DC=parentdomain,DC=r oot") 'Enumerate Container EnumerateUsers Container 'Clean up OutPutFile.Close Set FileSystem = Nothing Set Container = Nothing 'Say Finished when your done WScript.Echo "Finished" WScript.Quit(0) 'List all Users Sub EnumerateUsers(Cont) Dim User 'Go through all Users and select them For Each User In Cont Select Case LCase(User.Class) 'If you find Users Case "user" 'Select all proxyAddresses Dim Alias If Not IsEmpty(User.proxyAddresses) Then For Each Alias in User.proxyAddresses OutPutFile.WriteLine "alias: " & Alias 'WScript.Echo Alias Next End If Case "organizationalunit" , "container" EnumerateUsers User End Select Next End Sub -----Original Message----- From: Grantham, Caron [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 10:35 AM To: [EMAIL PROTECTED] Subject: [ActiveDir] Can LDP be used to create email report of all users in AD? I'm looking for a way to get an email address report for all user objects in Active Directory. Any idea on how to do this? I see the mail attribute in LDP but how can I get just this one field filtered out into a report Thanks List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/