I had to do a similar taks once, so I have a script.
The script is recursive.
Please understand, it is very easy to damage your AD with a badly
written script.
This script does not write to the directory so, you should have no
problem.
Use at you own risk of course. Don't use it if you don't understand it.
etc.
Change the line which specifies the OU, it will enumerate all the users
and output some details including all proxy addresses.
the output is as follows...
dn: CN=xxxxx,OU=xxxxx,DC=xxxxx,DC=xxxxx
DisplayName: xxxxx xxxxx
givenName: xxxxx
cn: xxxxx
name: xxxxx
proxy Address : smtp:[EMAIL PROTECTED]
proxy Address : smtp:[EMAIL PROTECTED]
proxy Address : FAXMAKER:[EMAIL PROTECTED]
proxy Address : X400:c=xxxxx;a= ;p=xxxxx;o=xxxxx;s=xxxxx;g=xxxxx;
the script is as follows
'SCRIPT START
Option Explicit
'Global variables
Dim oContainer
Dim OutPutFile,tmp,addr
Dim FileSystem
'Initialize global variables
Set FileSystem = WScript.CreateObject("Scripting.FileSystemObject")
Set OutPutFile = FileSystem.CreateTextFile("Export1.txt", True)
Set oContainer=GetObject("LDAP://ou=hospital,DC=ccia,DC=local")
'Enumerate Container
EnumerateUsers oContainer
'Clean up
OutPutFile.Close
Set FileSystem = Nothing
Set oContainer = Nothing
WScript.Echo "Finished"
WScript.Quit(0)
Sub EnumerateUsers(oCont)
Dim oUser
' enumerate all objects
For Each oUser In oCont
Select Case LCase(oUser.Class)
'if the object is a user object
Case "user"
If Not IsEmpty(oUser.distinguishedName) Then
OutPutFile.WriteLine "dn: " & oUser.distinguishedName
End If
If Not IsEmpty(oUser.DisplayName) Then
OutPutFile.WriteLine "DisplayName: " & oUser.get("DisplayName")
End If
If Not IsEmpty(oUser.givenName) Then
OutPutFile.WriteLine "givenName: " &
proper(oUser.get("givenName"))
End If
If Not IsEmpty(oUser.cn) Then
OutPutFile.WriteLine "cn: " & oUser.get("cn")
End If
If Not IsEmpty(oUser.name) Then
OutPutFile.WriteLine "name: " & oUser.Get ("name")
End If
if not isempty(ouser.proxyaddresses) then
for each addr in oUser.proxyaddresses
OutPutFile.WriteLine "proxy Address : " & addr
next
end if
' if it is a contaner object, drill down
Case "organizationalunit" , "container"
EnumerateUsers oUser
End Select
OutPutFile.WriteLine
Next
End Sub
Function proper(str)
tmp=lcase(str)
proper=ucase(left(tmp,1)) & right(tmp,len(tmp)-1)
End Function
'SCRIPT END
this may not do exactly what you want , but you should be able to tweak
it.
Matt
--
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Bowles, John (OIG/OMP)
> Sent: Thursday, 1 April 2004 2:48 AM
> To: Exchange Discussions
> Subject: SMTP Addresses
>
>
> All,
>
> Is there any utility inside of AD that allows you to check to
> see if users or contacts have multiple SMTP addresses?
>
> All 2000 shop.
>
>
> Thank you,
>
> __________________
> John Bowles
> Exchange Engineer
> OIG/HHS
> [EMAIL PROTECTED]
>
>
> _________________________________________________________________
> List posting FAQ: http://www.swinc.com/resource/exch_faq.htm
> Web Interface:
> http://intm-dl.sparklist.com/cgi-bin/lyris.pl?enter=exchange&t
ext_mode=&lang=english
To unsubscribe: mailto:[EMAIL PROTECTED]
Exchange List admin: [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at: Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.
_________________________________________________________________
List posting FAQ: http://www.swinc.com/resource/exch_faq.htm
Web Interface:
http://intm-dl.sparklist.com/cgi-bin/lyris.pl?enter=exchange&text_mode=&lang=english
To unsubscribe: mailto:[EMAIL PROTECTED]
Exchange List admin: [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.