Remote Support Software

Provide instant remote support to customers and employees:

Click here for a free trial

Have script to change primary smtp address I'd like comments on.

Everyone,
I have this script; see below, that will add/change a primary SMTP address. Id like everyones comment on it because it just seems too simple. We are thinking of adding a different
primary smtp address such as first initial, last name , other than the standard of 8 char to left of the @ sign.
Ive tested it ok on our lab exchange server and it worked.but like I said it just seems to simple.
Tiny..
Start-Transcript c:\temp\mailboxcreatelog.txt
Import-CSV c:\temp\input.csv | %{
Set-mailbox -Identity $_.DisplayName -EmailAddressPolicyEnabled $false

Set-Mailbox -Identity $_.DisplayName -PrimarySmtpAddress $_.primarysmtpaddress
}

Need to support users over the internet? click here try our remote control online beta






June 15th, 2012 9:31am
if you have it working in your lab and production is simliar I don't see any reason for it not to work.
script seems clean and I think it shuold do the job.
Lasse Pettersson
http://anewmessagehasarrived.blogspot.com


There is an amazing pack of free network admin tools. click here to download it






June 15th, 2012 2:59pm
if you have it working in your lab and production is simliar I don't see any reason for it not to work.
script seems clean and I think it shuold do the job.
Lasse Pettersson
http://anewmessagehasarrived.blogspot.com


There is an amazing pack of free network admin tools. click here to download it






June 15th, 2012 3:09pm
Lasse, thanks for the encouragement...just seems to simple...

tiny..

There is an amazing pack of free network admin tools. click here to download it






June 15th, 2012 3:34pm
Lasse, thanks for the encouragement...just seems to simple...

tiny..

Need to support users over the internet? click here try our remote control online beta






June 15th, 2012 3:43pm
I would highly suggesting changing your EAP to use the new format instead of disabling EAP enforcement on the objects.

If you only want the new e-mail address to go to certain objects use filters, the Custom Attributes fields are great for this.
In general e-mail addresses should be change via EAPs not directly. Without EAPs there is no way to enforce standard formatting of addresses. Admins will need to remember to set the e-mail address as needed when creating new users too
if the default\matching EAP isn't configured to have the desired format.If this post helps to resolve your issue, please click the "Propose as Answer" If you find it helpful , mark it as helpful by clicking on "Vote as Helpful" button at the top of this message. By marking a post as Answered, or Helpful
you help others find the answer faster. If you need an expert migration consultant to assist your organization feel free to contact me directly.

Jason Sherry | Blog |
Hire Me | Twitter: @JasonSherry
Microsoft Infrastructure Architect, MCSE: M, MCTIP, Microsoft Exchange MVP

There is an amazing pack of free network admin tools. click here to download it






June 16th, 2012 2:56pm
I would highly suggesting changing your EAP to use the new format instead of disabling EAP enforcement on the objects.

If you only want the new e-mail address to go to certain objects use filters, the Custom Attributes fields are great for this.
In general e-mail addresses should be change via EAPs not directly. Without EAPs there is no way to enforce standard formatting of addresses. Admins will need to remember to set the e-mail address as needed when creating new users too
if the default\matching EAP isn't configured to have the desired format.If this post helps to resolve your issue, please click the "Propose as Answer" If you find it helpful , mark it as helpful by clicking on "Vote as Helpful" button at the top of this message. By marking a post as Answered, or Helpful
you help others find the answer faster. If you need an expert migration consultant to assist your organization feel free to contact me directly.

Jason Sherry | Blog |
Hire Me | Twitter: @JasonSherry
Microsoft Infrastructure Architect, MCSE: M, MCTIP, Microsoft Exchange MVP

Need to support users over the internet? click here try our remote control online beta






June 16th, 2012 2:58pm
Disable address policy can be a good thing in some cases and can be bad in some cases. One thing I hate is when there is conflict with email addresses, then policy simply add a sequence number afterwards with out telling.
Lasse Pettersson
http://anewmessagehasarrived.blogspot.com


There is an amazing pack of free network admin tools. click here to download it






June 17th, 2012 1:07am
Disable address policy can be a good thing in some cases and can be bad in some cases. One thing I hate is when there is conflict with email addresses, then policy simply add a sequence number afterwards with out telling.
Lasse Pettersson
http://anewmessagehasarrived.blogspot.com


Need to support users over the internet? click here try our remote control online beta






June 17th, 2012 1:10am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics