Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

on exchange 2010 i want to change the alias for some users to match with primary SMTP address

$
0
0

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


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>