Home » Computers » Email » Set Exchange 2010 Alias to samAccountName

Set Exchange 2010 Alias to samAccountName

Use these PowerShell commands to set a users Exchange mailbox Alias to their username (AKA samAccountName/samid):
[code]
$aliasname = Get-Mailbox -OrganizationalUnit "OUNameHere" -ResultSize Unlimited
$aliasname | Foreach-Object{
$_ | Set-mailbox -Alias $_.SamAccountName
}
[/code]