Create a New Mail-Enabled Contact

Creates a new mail-enabled contact with the alias pilarackerman. This script/command requires Microsoft Exchange Server 2007.

Add to favorites
E-mail Twitter Digg Facebook
  • Avoid email policy enforcement on contacts.
    1 Posts | Last post November 29, 2010
    • By default, for some unknown reason, Exchange 2007 likes to leave the email address policy enabled/turned on for any new contacts created, which means any new contacts in an Exchange 2007 will also get one of the email organization's SMTP addresses as a secondary address which is really a bad idea in most enviornments (because it allows the outside person to use that secondary address as a pass through your system).
      The only way around this is to define both the -ExternalEmailAddress and -PrimarySmtpAddress attributes when the contact is created. Using both of those will automatically turn this "Automatically update e-mail addresses based on e-mail address policy" flag on the contact off, and prevent it from getting one of your email organization's SMTP addresses as a secondary address.
      One word of caution, when you create a contact in this method, for some unknown reason Exchange 2007 does not set the "mail" attribute on the contact which is required for OAB generation. To compensate for this you will need to have a second line in the script that stamps the WindowsEmailAddress like this:
      Set-MailContact -Identity $_.Name -WindowsEmailAddress $_.EmailAddress