Change Alias in Exchange 2007 to match Username

I need a script or something to change the alias in Exchange 2007 to match the username of serveral different users on serveral different exchange server. Some of the users are already setup this way and others are not.
vhaperbaugubAsked:
Who is Participating?
 
AkhaterConnect With a Mentor Commented:


$mbxs = get-mailbox -resultsize unlimited (for all exchange users)
$mbxs = get-mailbox -OrganizationalUnit domain.local/users  (for all users in a specific OU)
$mbxs = get-mailbox -Server servername (for all users in a specific server)

then



$mbxs | % { set-mailbox $_.DistinguishedName -Alias $_.SamAccountName}
0
 
vhaperbaugubAuthor Commented:
The script did the trick....Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.