Solved

How to export secondary smtp addresses

Posted on 2007-12-05
9
1,566 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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
LVL 1

Accepted Solution

by:
edicer earned 250 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

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.

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This article explains how to install and use the NTBackup utility that comes with Windows Server.
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
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…

742 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