Finding multiple primary SMTP addresses
Fixing accounts with multiple SMTP addresses is pretty easy, but I'm looking for a way to find all the mailboxes (or objects) in ActiveDirectory that are configured with multiple SMTP addresses. I'm trying to make a report of them so to head off helpdesk
calls when the account doesn't work. I'm looking to see where I get the error message: "There are multiple primary SMTP addresses. Please ensure there is only one primary address for each address type."
July 16th, 2010 5:03pm
Hi Glenn,
I belive its possible to use LDAP query by filter alias address from AD. Hope someone can give you good idea.Anil
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2010 7:26pm
Exchange version?[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
July 16th, 2010 9:13pm
Ah, that would be Exchange 2007 SP2 RU4.
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2010 9:26pm
Okay. From EMS try this:
foreach ($mbx in (get-mailbox -resultsize unlimited)) {
if (($mbx.emailaddresses |? {$_.prefixstring -ceq "SMTP"}).count -ge 2){
write-host "$($mbx.displayname) has multiple primary smtp addresses"
}
}
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
July 16th, 2010 9:33pm
That works great. Thank you!
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2010 11:26pm
Hi majolinor,
Would that apply to Exchange 2010?
June 10th, 2011 3:05pm
Yes.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
June 10th, 2011 3:21pm