New-TestCASConnectivityUser.ps1 Script Error – Mailbox could not be created. Verify that OU (Users) exists and that password meets complexity requirements…

MS Exchange

Exchange 2010 ships with a number of test cmdlets to test the CAS functionality, like testing Outlook, OWA, ActiveSync, POP, IMAP etc. But whenever you try and run a test cmdlet like Test-OutlookConnectivity, it will complain that it can’t find a test mailbox.

Test cmdlet error

Exchange 2010 ships with a script to create a test mailbox to run these test cmdlets. It’s named “New-TestCASConnectivityUser.ps1” and is stored in the Scripts directory. I ran this script in my lab only to be greeted with an error!

CreateTestUser : Mailbox could not be created. Verify that OU (Users) exists and that password meets complexity requirements.

Script error

I am sure that the password I entered was a complex one. That left me with the second half of the error message. I do have a “Users” OU and hence I took a look at the script only to find that the OU name is coded as “Users”. As I have (and many other companies have) more than one OU named “Users”, the script throws the error message.

Script in notepad

There are number of solutions for this issue.

  • Edit your OU structure so that there is only one OU named “Users”.
  • Edit the script with the distinguished name of the OU named “Users”.

Changing script

  • If you have a specific OU for test/service accounts, specify the DN of that OU in the script.

Once I made the changes, I was able to create the test account successfully using the script.

Script runs

Other Popular Articles


MS Exchange

Scripting Agent Initialization Failed: “File is not found” Error During Exchange 2016 Setup

MS Exchange

EAC Access While Co-Existing Exchange 2013 With 2010

MS Exchange

Delete All Calendar Entries In An Exchange 2010 Mailbox

17 thoughts on “New-TestCASConnectivityUser.ps1 Script Error – Mailbox could not be created. Verify that OU (Users) exists and that password meets complexity requirements…”

  1. When reading the script, I found that the $arg after $arg = “OU” replaces the default OU value;
    Therefore, you could use the New-TestCasConnectivityUser.ps1 -OU “domain.local/Users” command in stead.

    Reply
  2. Nothing helped in the above solutions.
    my solution was to delete the recovery database that was still running.

    Cheers

    Peter

    Reply
  3. Thanks for the info. Would you know why after running the script you get the yellow warning? and why would you be getting it?

    thank you

    Reply
    • Hi Robert,

      That is normal. It is just saying that the settings for the mailbox has not been modified. Safe to ignore.

      Reply

Leave a Comment