The Exchange 2007 Wiki

New-EmailAddressPolicy

MS Technet article on this cmdlet: New-EmailAddressPolicy

This command will create a new Email Address Policy (EAP), similar to recipient policies in E2k0/3.  These are used when a new mailbox is created in the EMC or EMS, using the New-Mailbox cmdlet.  The policies are also used when an mailbox is moved to an Exchange 2007 server from an 2000\2003 server using the EMC or EMS, using the Move-Mailbox cmdlet.

Examples:

Based on Department:

New-EmailAddressPolicy "KotSD Users" -RecipientFilter {((Department -eq "DDO") -and (RecipientType -eq 'UserMailbox' -or RecipientType -eq 'MailContact' -or RecipientType -eq 'MailUser'))} -EnabledEmailAddressTemplates "SMTP:%m@kotsd.org","smtp:%g@izzy.org","smtp:%g.%s@service1.net","smtp:%m@kotsd.com"

The above cmdlet will create a new EAP giving the user <alias>@kotsd.org as their primary SMTP address and the secondary addresses of <first name>@izzy.org, <first name>.<last name>@service1.net, and <alias>@kotsd.com.

Based on group membership:

Note: the MemberOfGroup property can now be added to Email Address Policies. This was fixed in SP1. 

New-EmailAddressPolicy "KotSD Users" -RecipientFilter {((MemberOfGroup -eq "CN=DDO Gamers,OU=DDO,OU=Users,DC=Altered,DC=com") -and (RecipientType -eq 'UserMailbox'))} -EnabledPrimarySMTPAddressTemplate 'SMTP:%m@kotsd.org'

In this example all members of the group "DDO Gamers" under the OU altered.com\Users\DDO will get the primary SMTP e-mail address of <mailbox nick name>@kotsd.org.

More examples are posted here: Email Address Policy and Address List Filter Upgrades

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 3/5/08 1:50 PM