Create a Linked Mailbox using Exchange Powershell
I would like to create linked mailbox using Exchange Powershell. I'm follow below link but it will prompt for password? It is possible to avoid prompting to key the password. So tha, I can create a batch file to create a linked mailbox
http://technet.microsoft.com/en-us/library/bb123524.aspx
November 11th, 2010 11:13pm
Please check below.
Exchange Server 2007 recipient management one-liners :
http://msexchangeteam.com/archive/2006/09/05/428833.aspx
Create a new linked mailbox::
New-Mailbox -alias testlinkedmbx -name TestLinkedMailbox -database "Mailbox Database" -org Users -LinkedMasterAccount
account@userdomain.com -LinkedDomainController userdomain-dc-01 -UserPrincipalName
testmbx@example.com
Hope this will help you.Anil
Free Windows Admin Tool Kit Click here and download it now
November 12th, 2010 10:27am
Hi Anil,
This is what i got:
Failed to resolve the linked master account and verify that it exists in a forest that is different from the forest tha
t hosts Microsoft Exchange. Error message: Failed to reconnect to Active Directory server manggis.srsb.domain.com.my. E
nsure the server is available and that you are using valid credentials.
At line:1 char:1
+ <<<< New-Mailbox -Alias testuser -Database Mensa\sg1\db1 -OrganizationalUnit 'domain.com/domaingroup/domain technolo
gy berhad' -LinkedMasterAccount testuser@srsb.domain.com.my -Linkeddomaincontroller manggis.srsb.domain.com.my -UserPri
ncipalName testuser@domain.com
+ CategoryInfo : InvalidOperation: (:) [], InvalidOperationException
+ FullyQualifiedErrorId : 6EA42B8
November 14th, 2010 9:32pm
>
Failed to reconnect to Active Directory server manggis.srsb.domain.com.my. E
nsure the server is available and that you are using valid credentials
>
1: Are you having enough permission in ORG
2: Check Forest Trust relation correctly
3:Run cmdlet on mailbox sevrer and checkAnil
Free Windows Admin Tool Kit Click here and download it now
November 15th, 2010 2:34am
If I run the command below:
$cred = Get-Credential <enter>
It will prompt for username and password and I manually key in the resouces forest admin account and password
then
I used below command:
New-Mailbox -alias testlinkedmbx -name TestLinkedMailbox -database "Mailbox Database" -org Users -LinkedMasterAccount
account@userdomain.com -LinkedDomainController userdomain-dc-01 -UserPrincipalName
testmbx@example.com -LinkCredentail $cred
it is work.
But what i want is.
I want to create bulk linked mailbox without prompting for admin username and password so that I able to create a batch file to run schedule it during after office hours..
Please advice.
December 1st, 2010 8:18pm
On Thu, 2 Dec 2010 01:14:51 +0000, Suriya25 wrote:
>
>
>If I run the command below:
>
>$cred = Get-Credential <enter>
>
>It will prompt for username and password and I manually key in the resouces forest admin account and password
>
>then
>
>I used below command:
>
>New-Mailbox -alias testlinkedmbx -name TestLinkedMailbox -database "Mailbox Database" -org Users -LinkedMasterAccount account@userdomain.com -LinkedDomainController userdomain-dc-01 -UserPrincipalName testmbx@example.com -LinkCredentail $cred
>
>it is work.
>
>But what i want is.
>
>I want to create bulk linked mailbox without prompting for admin username and password so that I able to create a batch file to run schedule it during after office hours..
You can store the credential in a file:
http://bsonposh.com/archives/338
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
December 1st, 2010 9:56pm
It is work. Before create a link mailbox,I need to manually create a user in Resource Forest first then fire up the cmdlet
December 7th, 2010 9:07pm