on exchange 2010 i want to change the alias for some users to match with primary SMTP address
i found the below but it does for all, can i modify it to be able to apply on a group of users only
#get all mailboxes
$list = Get-Mailbox -ResultSize Unlimited
#process each mailbox
ForEach ($item in $list)
{
#get local side of email address
$user = Get-User $item
$localemail = $user.WindowsEmailAddress | select local
#set alias using left side of the email address
Set-Mailbox $item -Alias $localemail