? PS cmdlet for Enable-Mailbox Alias set to SamAccountName
I have Exchange 2007 in a classroom/demo/lab environment. I have approx 100 AD users on a W2k3 Domain ControllerI want to Enable the Ad users but have the mailbox alias mathch the SamAccountNameSo this is what I have now :get-user -OrganizationalUnit ClassAccounts |Enable-Mailbox -database <servername>\"first Storage Group"\Mailbox Database"the above works but the alias looks like FirstNameLastName@local.comAnd I want to to be set to their SamAccountName instead...?Thanks in advance
September 29th, 2009 8:05am

I guess, you are talking about smtp address, right?It is being generated based on Email address policy defined in your Exchange environment... Managing E-Mail Address Policies http://technet.microsoft.com/en-us/library/aa998940.aspxAmit Tank | MVP Exchange Server | MCITP: EMA | MCSA: M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
September 29th, 2009 8:36am

HI, what is you mean calling "SamAccountName ".If you want to add your cooperate domain name instead of the locale domain, you can use Email Address policy as amit said. Resources Managing E-Mail Address Policies in Exchange Server 2007 Yes, Exchange 2007 really enforces Email Address Policies Managing E-Mail Address Policies Regards Chinthaka Shameera | MCITP: EA | MCSE: M | http://howtoexchange.wordpress.com/
September 29th, 2009 8:46am

Hi,you mean to say that your alias name should be same as windows logon name right ?I just tried account with the above command andworked perfectly fine. Alias name was same as the samaccountname or user logonname Regards,Krishnahttp://smtpport25.wordpress.com
Free Windows Admin Tool Kit Click here and download it now
September 29th, 2009 10:49am

If you need to set the email address according to alias then follow the below table Variable Description %g Used for given name (first name) %i Used for middle initial %s Used for surname (last name) %d Used for display name %m Used for Exchange alias %xs Uses the x number of letters of the surname. For example if x=2, then the first two letters of the surname are used. %xg Uses the x number of letters of the given name. For example, if x=2, then the first two letters of the given name are used. More information:- Managing E-Mail Address Policies in Exchange Server 2007 http://www.msexchange.org/articles_tutorials/exchange-server-2007/management-administration/managing-email-address-policies.html Vinod |CCNA|MCSE 2003 +Messaging|MCTS|ITIL V3|
September 29th, 2009 1:12pm

Wow, thx for all the differents ways to set the aliases via the Enable Mailbox cmdlet....I have been informed, and thx for all the folks who posted a reply...mucho gracias
Free Windows Admin Tool Kit Click here and download it now
September 30th, 2009 6:18am

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

Other recent topics Other recent topics