?
Solved

How to export secondary smtp addresses

Posted on 2007-12-05
9
Medium Priority
?
1,570 Views
Last Modified: 2013-11-30
How do I export user's secondary smtp addresses along with their primary smtp address? We have a Windows 2003 AD domain and Exchange 2003 SP2.
0
Comment
Question by:mokn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 10

Expert Comment

by:Rogiee
ID: 20417252
Hello mokn,

CSVDE should work for you.  Run it from your Exchange server and save it as a .csv and you should be able to find secondary SMTP addresses.

http://www.ss64.com/nt/csvde.html



Regards,

Rogiee
0
 
LVL 1

Author Comment

by:mokn
ID: 20419869
What I am hoping to find is the exact syntax to use being that I am not familiar with this export tool. Thanks.
0
 
LVL 10

Expert Comment

by:Rogiee
ID: 20419982
csvde -f ADExport.csv
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 1

Accepted Solution

by:
edicer earned 1000 total points
ID: 20420200
'Global variables
Dim Container
Dim OutPutFile
Dim FileSystem

'Initialize global variables
Set FileSystem = WScript.CreateObject("Scripting.FileSystemObject")
Set OutPutFile = FileSystem.CreateTextFile("smtpaddresses.txt", True)

'Replace with valid DN of the container you want to enumerate
Set Container=GetObject("LDAP://CN=Users,DC=YourDomain,DC=com")
'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
    'OutPutFile.Write User.DisplayName
    For Each Alias in User.proxyAddresses
        If InStr(1,Alias,"smtp",1) > 0 Then
                  OutPutFile.WriteLine User.DisplayName & vbTab & Replace(Alias,"smtp:","",1,1,1)
                  'WScript.Echo User.DisplayName & vbTab & Replace(Alias,"smtp:","",1,1,1)
            End If
    'WScript.Echo Alias
        Next
  End If

Case "organizationalunit" , "container"

EnumerateUsers User

End Select
Next
End Sub
0
 
LVL 10

Expert Comment

by:Rogiee
ID: 20481421
Hey there.  How did the CSVDEwork out for ya?
0
 
LVL 1

Author Comment

by:mokn
ID: 20536746
I haven't tried these suggestions yet. I am hoping to get back to this next week after the Holiday's. Please keep this question open for now.

Thanks,
M.
0
 

Expert Comment

by:dniconsulting
ID: 20631229
edicer's script worked for me, if that's any consolation to the question. i did change 'case "user"' to 'case "user", "group"' to include distribution groups, but it works as-is after you fill in the LDAP search string.

thanks a bunch. wish i could assign you points myself!
0
 
LVL 1

Author Closing Comment

by:mokn
ID: 31412970
For our environment our 'Users' OU is two levels down.  I had to change CN= to OU=
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
I don't pretend to be an expert at this, but I have found a few things that are useful. I hope that sharing them here will help others, so they will not have to face some rather hard choices. Since I felt this to be a topic of enough importance and…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question