Albert Widjaja
asked on
Showing mailbox with different email domain alias
Hi People,
Can anyone please assist me with the powershell script to display the mailbox with additional alias or different authoritative domain ?
I got a script here from one of the Experts-Exchange author jjmck:
the script above was to change any email address that has different authoritative domain. what I need is to know how many records first then do the changes so that my manager know how many mailboxes affected.
so if anyone please can assist me in modifying those script above that'd be greatly appreciated.
Thanks
Can anyone please assist me with the powershell script to display the mailbox with additional alias or different authoritative domain ?
I got a script here from one of the Experts-Exchange author jjmck:
$domain = ""
Get-Mailbox -ResultSize unlimited | % {
foreach ($address in $_.emailaddresses) {
If (($address.type -eq "SMTP") -and (($address.Address.Split("@")[1] -eq $domain))) {
$_.emailaddresses -= [Microsoft.Exchange.Data.ProxyAddress]("smtp:$($address.address)")
}
}
Set-Mailbox $_.primarysmtpaddress -EmailAddresses $_.EmailAddresses
}
the script above was to change any email address that has different authoritative domain. what I need is to know how many records first then do the changes so that my manager know how many mailboxes affected.
so if anyone please can assist me in modifying those script above that'd be greatly appreciated.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
JJ, why it only shows the number 0 as the result ?
I have changed the $domain = "mydomain.com"
I have changed the $domain = "mydomain.com"
ASKER
Thanks !
ASKER
I haven't tried that script yet as it is still on my way to the office. hopfully it should also displays the mailboxes with different mail domain as well.