Email Address Already in use

Hi all,

Yet another Question, I would like to know how to find out who is actually using a particular email address in the organisation.

Is there a way to find this info quickly rather than going thru everyones email aliases??


Who is Participating?
MicrotechConnect With a Mentor Commented:
Hi SynsealIT,
copy this text into a nodepad file and save as .VBS

Const Writable      = 2

Set objFSO           = CreateObject("Scripting.FileSystemObject")
Set objLog          = objFSO.OpenTextFile("c:\proxydump.csv", Writable, True)
Set cn               = CreateObject("ADODB.Connection")
Set cm               = CreateObject("ADODB.Command")
Set rs               = CreateObject("ADODB.RecordSet")

With cn
     .Provider     = "ADsDSOObject"
     .Open "Active Directory Provider"
End With

Set cm.ActiveConnection = cn

strDomainDN          = InputBox("Please Enter the Servername and Domain DN. " & vbCrLf & " Example: Myserver/DC=test,DC=lab ")

cm.CommandText = "<LDAP://" & strDomainDN & ">;(&(objectCategory=user)(proxyAddresses=*));distinguishedName,mail,proxyAddresses;subtree"
cm.Properties("Page Size") = 1000

Set rs               = cm.Execute

While Not rs.EOF

     On Error Resume Next
     strUserDN     = rs.Fields("distinguishedName")
     strProxyAddress = rs.Fields("proxyAddresses")

     objLog.Write strUserDN
     objLog.Write ","
     For Each Item in strProxyAddress
          strTempAddr = Item
          objLog.Write Item & ";"

     objLog.Write vbCrLf


msgbox "Export Complete to c:\proxydump.csv"

this will create a csv file on your c drive with all smtp addresses in your domain.

Hope This helps
SynsealITAuthor Commented:
Thats mint matey!!! Bril :) only thing i it is a public folder i believe that has this alias. Is there any mods i can make to script that will allow this???

Thanks again

I tend to just type the full email address in to Outlook's To: line and then wait to see what Outlook resolves it to.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.