Monday, 25 July 2011

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

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


No comments:

Post a Comment