Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 739
  • Last Modified:

Exchange 2007 add external account with powershell

hello,

i want to add a external account to a mailbox, in exchnage 2003 you can open the account end simply add a account and place external account to it. the you have a linked mailbox.

but this is not possibly on a exchange 2007 sp3 machine. I understand that now you have to do it with powershell.

can someone give met the correct commanline to do this. the external account must have fulll control on the mailbox.
0
Mr-Black
Asked:
Mr-Black
  • 2
  • 2
2 Solutions
 
Brando PeterCommented:
Here you go:

C:\>$credential = Get-Credential

Fill in the dialog box with the Account Forest credentials

C:\>New-mailbox –Name user1 -Alias user1 -OrganizationalUnit OU1 -UserPrincipalName user1@resource.forest.domain –Database db1 -LinkedMasterAccount externalforest\user1 -LinkedDomainController dc1.externalforest.com -LinkCredential $credential

0
 
Mr-BlackAuthor Commented:
And what will it be to link a external acocunt to a existing mailbox.
0
 
Brando PeterCommented:
If that mailbox is still enabled:
Disable-Mailbox -Identity User1
$cred = Get-Credential
Connect-Mailbox -Identity User1 -Database db1 -LinkedDomainController dc1.externalforest.com -LinkedMasterAccount externalforest\user1 -linkeddomaincontroller dc1.externalforest.com -LinkedCredential $cred

If the mailbox has already been disabled/disconnected just run the connect-mailbox command
0
 
Praveen BalanSolution ArchitectCommented:
If you want to create Linked mailbox, you may also use exchange 2007 EMC(Management Console).
In Recipient Management, start the new mailbox wizard and then select the Linked Mailbox option and follow the wizard with necessary inputs.

If you are comfortable with the command line(Power Shell), you may proceed with the answer above.

the process is really simple and straight forward, but you need to ensure that the required trust relationship exists with both forest(Account and Resource).

ref - http://technet.microsoft.com/en-us/library/bb123524.aspx

if you want to link to existing mailbox, you will have to disable the source account, disable mailbox and then connect it to external account.
    Disabled the user account in source forest (Use ADUC)
    Disable the user mailbox(Disable-Mailbox cmdlet)
    Run the Clean-MailboxDatabase against the DB to quickly show the diconnected mailboxes in EMC
    Connect the mailbox as Linked Mailbox.
-Praveen




-Praveen
0
 
Mr-BlackAuthor Commented:
last option works praveen
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now