SOLVED

Mailbox with multiple different aliases - identification mechanism?

%3CLINGO-SUB%20id%3D%22lingo-sub-290268%22%20slang%3D%22en-US%22%3EMailbox%20with%20multiple%20different%20aliases%20-%20identification%20mechanism%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-290268%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20all%2C%3C%2FP%3E%3CP%3EWe%20have%20Exchange%202103%20on%20prem%20with%20approx.%201200%20mailboxes.%3C%2FP%3E%3CP%3EWe%20are%20trying%20to%20find%20a%20simple%20was%20(if%20possible)%20to%20find%20all%20mailboxes%20with%20an%20alias%20which%20has%20been%20added%20manually%20and%20is%20not%20linked%20to%20the%20username.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ee.g.%26nbsp%3B%20firstname.surname1%20is%20an%20alias%20and%20this%20users%20mailbox%20has%20multiple%20email%20addresses%20based%20on%20the%20domains%20we%20accept%20email%20for%20with%20this%20alias%3C%2FP%3E%3CP%3Ewe%20have%20manually%20added%20leavers%20email%20aliases%20to%20some%20accounts%2C%20so%20the%20mailbox%20above%20could%20have%20another%20email%20address%20of%20firstname.surname2%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20of%20identifying%20these%20mailboxes%20without%20manually%20checking%20them%20all%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETIA%2C%20Andy%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-290268%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2013%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-290657%22%20slang%3D%22en-US%22%3ERe%3A%20Mailbox%20with%20multiple%20different%20aliases%20-%20identification%20mechanism%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-290657%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Vasil%2C%20gives%20me%20something%20to%20work%20with!!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-290432%22%20slang%3D%22en-US%22%3ERe%3A%20Mailbox%20with%20multiple%20different%20aliases%20-%20identification%20mechanism%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-290432%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20can%20define%20a%20robust%20set%20of%20criteria%20for%20aliases%20%22added%20manually%20and%20not%20linked%20to%20the%20username%22%2C%20you%20can%20surely%20run%20a%20PowerShell%20script%20that%20goes%20over%20all%20mailboxes%20and%20returns%20matching%20ones.%20For%20example%2C%20this%20will%20return%20any%20objects%20that%20DO%20have%26nbsp%3Bat%20least%20one%26nbsp%3Bemail%20address%20in%20the%20format%26nbsp%3BFirstName.LastName%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EGet-Recipient%20%7C%20%25%20%7B%20if%20(%24_.EmailAddresses%20-match%20%22%24(%24test.FirstName)%22%20%2B%20%22.%22%20%2B%20%22%24(%24test.LastName)%22%20)%20%7B%24_%7D%20else%20%7B%7D%20%7D%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hello all,

We have Exchange 2103 on prem with approx. 1200 mailboxes.

We are trying to find a simple was (if possible) to find all mailboxes with an alias which has been added manually and is not linked to the username.

 

e.g.  firstname.surname1 is an alias and this users mailbox has multiple email addresses based on the domains we accept email for with this alias

we have manually added leavers email aliases to some accounts, so the mailbox above could have another email address of firstname.surname2

 

Is there a way of identifying these mailboxes without manually checking them all?

 

TIA, Andy 

2 Replies
Highlighted
Best Response confirmed by AndrewStory (New Contributor)
Solution

If you can define a robust set of criteria for aliases "added manually and not linked to the username", you can surely run a PowerShell script that goes over all mailboxes and returns matching ones. For example, this will return any objects that DO have at least one email address in the format FirstName.LastName:

 

Get-Recipient | % { if ($_.EmailAddresses -match "$($test.FirstName)" + "." + "$($test.LastName)" ) {$_} else {} }
Highlighted

Thanks Vasil, gives me something to work with!!