I am an admin in a multi domain environment. (Names Changed, but here's what it's like:)
Domain1.forest1.com
DomainA.Domain1.forest1.co
m
Domain2.forest1.com
Sample Users:
Login: Domain1\User1 - Mailbox: Domain2\User1
Login: DomainA\UserA - Mailbox: Domain2\UserA
Login: Domain2\User2 - Mailbox: Domain1\User2
So, you can see there are users with mailboxes in separate domains within the forest.
If I change scope to forest view, I can get-mailbox and set-mailbox and enable-ummailbox etc... however, for the purpose of this business task, this is impractical.
What I need is a way to get the name (either FQDN or just CN or what ever) of the domain that hosts the mailbox for a user. This does not need to be in any specific format (such as a cmdlet). A function or a single command would be great too.
Example of what I would like to work:
c:\$adminsessionsettings.v
iewentiref
orest = $true
C:\get-mailboxLocation User1
Domain2
C:\get-mailboxLocation UserA
DomainA.Domain1.Forest1.co
m
I have tried looking at get-mailbox <alias> | fl and get-user <alias> | fl, but none of the attributes are definative answers to "what domain does the mailbox belong to". Unfortunately, We also have Server1.domain1.com that hosts mailboxes from all 3 domains so looking at get-mailbox <alias> | select-object MailServer won't help either.
500 Points up for grabs on this.
Thanks,
Chris
Start Free Trial