Tuesday, December 13, 2011

Mailbox could not be created. Verify that OU ( Users ) exists

In Exchange when you run the test commands such as Test-OutlookWebServices or Test-FederationTrust for example it requires a Exchange Test account. This is usually created by running the New-TestCasConnectivityUser.ps1 script from the Exchange 2010 scripts Directory C:\Program Files\Microsoft\Exchange Server\V14\Scripts.

If you don't create a test user account you will receive such errors in PowerShell:


Failed to find the mailbox. Mailbox = 'extest_40f651ff86fd4@4logic.lan'.
+ CategoryInfo : NotSpecified: (:) [Test-OutlookWebServices], MailboxNotFoundException
+ FullyQualifiedErrorId : Microsoft.Exchange.Monitoring.MailboxNotFoundException,Microsoft.Exchange.Management.SystemConfigurationTasks.TestOutlookWebServicesTask


Couldn't find object "extest_40f651ff86fd4". Please make sure that it was spelled correctly or specify a different object.
+ CategoryInfo : NotSpecified: (:) [Test-FederationTrust], ManagementObjectNotFoundException
+ FullyQualifiedErrorId : C5C16259,Microsoft.Exchange.Management.SystemConfigurationTasks.TestFederationTrust

However today when I ran the New-TestCasConnectivityUser.ps1 it complained that it could not find the Users OU, a problem which I had not seen before. I know that the password I supplied met the complexity requirements. This is the error I was receiving.

CreateTestUser : Mailbox could not be created. Verify that OU ( Users ) exists and that password meets complexity requirements.
At C:\Program Files\Microsoft\Exchange Server\V14\Scripts\new-TestCasConnectivityUser.ps1:267 char:31
+ $result = CreateTestUser <<<< $exchangeServer $mailboxServer $securePassword $OrganizationalUnit $UMDialPlan $UMExtension $Prompt
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,CreateTestUser

I simply specified my Users OU and it created the object...

get-mailboxServer .\new-TestCasConnectivityUser.ps1 -ou 4logic.lan/users


  1. Thanks for this. I just ran into precisely the same issue.

    i have been looking for a solution to this for some time now.
    i just needed to specific the OU.

    j alfredo

  3. don't know why this suddenly needs to be specified when giving the PS command to create the test user. But it did the trick!!!
    today i already used it twice on different new customer environments.
    thanks a lot!!

    greetings from Mike (netherlands)

  4. Hi,

    there's the pipe missing in your command above. The associated Image is fine.
    get-mailboxServer | .\new-TestCasConnectivityUser.ps1 -ou 4logic.lan/users

  5. Thanks for the solution!