Extracting Email Address from Microsoft Exchange

0

We have a Microsoft Exchange server that has a lot of email address information for all of our Active Directory Users. What would be the best way to pull that email list so that I can attached it to a Active Directory's user account. ( I know how to import into AD ) I just don't know how to export information from Microsoft exchange without the Exchange Management Shell.

I do not have access to the Exchange Management Shell nor do I know how to get it. I was thinking there was some way of doing it by Power-Shell/C#, but honestly i'm not sure what I would be calling to even start. Does anyone have any ideas or even something I can read to get started?

TheAirborneranger

Posted 2019-03-29T12:55:32.047

Reputation: 1

1The EMS is PowerShell... – I say Reinstate Monica – 2019-03-29T12:59:49.257

"...so that I can attached it to a Active Directory's user account." Please clarify what you mean by "attach" the email address to the AD account. – I say Reinstate Monica – 2019-03-29T13:01:33.270

1Why would you not be able to get access to the EMS if you need that information? – Seth – 2019-03-29T13:06:27.420

I am assuming that the pull would come in a csv format. With that I was going to populate my user ad accounts with their email in the attribute editor (mail) since a good bit of my users do not have their email in there. – TheAirborneranger – 2019-03-29T13:11:18.493

@TwistyImpersonator I thought to use the EMS you need to be on the actual Exchange Server. I could be wrong and if I am please let me know. I know nothing about Exchange hints why I asked about something to read :). – TheAirborneranger – 2019-03-29T13:18:04.830

You can either install the EMS on a machine or use it through PowerShell remoting (this will limit some of the objects). If a user object is connected to a mailbox there are more attributes necessary than just the mail address. So make sure what you're looking at and what you want to do. See also Connect-Mailbox.

– Seth – 2019-03-29T13:30:59.840

Answers

0

Exchange management shell is just powershell that's loaded with the Microsoft.exchange module/configuration. You can use powershell to tap into exchange by using the commands in the below link;

https://docs.microsoft.com/en-us/powershell/exchange/exchange-eop/connect-to-exchange-online-protection-powershell?view=exchange-ps

I use this frequently when I don't need to go into the mail server but you have to ensure that PSRemoting is enabled and there are a few other prerequisites that need to be setup detailed in the link. You might have to switch authentication method depending on how your AD authentication is setup (Kerberos/basic is most common)

Other than this, you can export a list from exchange in the Recipient configuration -> mailbox section and on the right-hand pane there is an export list function. This exports the display name, OU, mailbox type, email address etc. and then you should be able to format this in a way you'd like it, but it's not as granular as the powershell method where you can specify exactly what you want exporting.

Also, if you can define a logic for the users email address, you could just use a powershell script to import the email addresses into AD if it follows a consistent format of for example, firstname.surname@company.co.uk, so no need to even touch the mail server in this method. If this is the case, you would need to use a ForEach-object import and then query AD to pull each first name, surname and then concatenate these strings into an import function to show "$Firstname, $Surname"@company.co.uk which will loop through each user and apply the e-mail address using the Set-ADUser cmdlet.

RhysPickett

Posted 2019-03-29T12:55:32.047

Reputation: 102

0

If you can access the Exchange admin center, you can also export the SMTP email addresses from the EAC, which will provide the UI to export the data.

enter image description here

enter image description here

Steve Fan

Posted 2019-03-29T12:55:32.047

Reputation: 1 089