Solved

How to change External SMTP Address for Mail Contacts in Exchange 2007

Posted on 2009-03-30
6
914 Views
Last Modified: 2012-08-13
Hi there,

i have nearly 200 external Mail contacts on an exchange 2007. I need to change the external SMTP Adress from firstname.lastname@external.old to firstname.lastname@external.new by April 1st 00:00 hour. What would be the right powershell comand, when i use the customattribute1 as a filter?
Thanks in advance.
0
Comment
Question by:ok-disaster
6 Comments
 
LVL 6

Assisted Solution

by:defkamel
defkamel earned 50 total points
ID: 24023107
0
 
LVL 2

Author Comment

by:ok-disaster
ID: 24026853
hey thanks,
it seems to go in the right direction.
BUT: how is it done to be the external email address?
I still have to open the external contact choose the mailaddress and klick on "use as external"
sorry got the exchange 2007 in german. so I do not know what it says in english
0
 
LVL 6

Assisted Solution

by:KevinBall
KevinBall earned 50 total points
ID: 24026893
To change settings for a contact, you can use the powershell command Set-MailContact which can be used to alter pretty much every attribute.  The one you want is -ExternalEmailAddress
0
Do email signature updates give you a headache?

Constantly trying to correctly format email signatures? Spending all of your time at every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

 
LVL 2

Author Comment

by:ok-disaster
ID: 24027084
could you please tell me what the command would be? unfortunately i am not so much into powershell commands ;-)
something like: Set-MailContact -Filter CustomAttribute1 -eq "test" -ExternalEmailAddress "%g.%s@external.new"
I tried this but it says that i cannot use filter with the set-mailcontact command
0
 
LVL 12

Accepted Solution

by:
GusGallows earned 150 total points
ID: 24335879
I know you wanted this by April 1st, but I just didn't see it till now. If you still need the answer, try the following:

Not sure if this helps you now, but if not, maybe someone else will find it useful.
#Create a list of all mailcontacts where CustomAttribute1 = test

$mcontact = get-mailcontact | Where {CustomAttribute1 -eq 'Test'}
 

#go through the list one at a time

for ($i = 0; $i -le ($Contact.Length -1); $i +=1) 

{

#Get the firstname and lastname value from the contact record (not mailcontact)

$contact = get-contact $mcontact[$i]

$FN = $contact.FirstName

$LN = $contact.LastName

#Create the SMTP address based on the firstname and lastname

$eSMTP = "$FN.$LN@external.new"

#Set the ExternalEmailAddress to the new address

Set-MailContact $contact -ExternalEmailAddress $eSMTP

}

Open in new window

0
 
LVL 12

Assisted Solution

by:GusGallows
GusGallows earned 150 total points
ID: 24335888
DOh, just noticed an error. The following:
$mcontact = get-mailcontact | Where {CustomAttribute1 -eq 'Test'}
should read
$mcontact = get-mailcontact | Where {$_.CustomAttribute1 -eq 'Test'}
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
In this video we show how to create an Address List 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 Organization >> Ad…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now