Zero Hour Sleep
5Oct/105

new-TestCasConnectivityUser.ps1 fails with Verify that OU ( Users ) exists

When trying to run the new-TestCasConnectivityUser.ps1 script the latter might fail with the following error

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

new-TestCasConnectivityUser.ps1

The first thing you need to do is making sure that the password does meets complexity requirements however if you did and still having the failure you most probably have multiple OUs with name "Users" and that is why the script is failing.

The solution for this is to specify the OU in the command by running the following

get-mailboxServer | .\new-TestCasConnectivityUser.ps1 -OU domain.com/users

Enjoyed the post, what is next?

Grab our FULL RSS feed! or Email Updates then share it

About Antoine Khater

I have been working in IT consultancy and solution integration since 1998 and I consider myself lucky to be, one in a few, making a living out of my passion. I am also member of the famous Experts Exchange (profile here) online community where I try my best to share what I have learned along the road.
  • Jay

    Thank you. But that backslash in “domain.comusers” alsmost made me pull out my hair…
    Better make that “domain.com/users

  • http://whygoogle.me/ akhater

    Thanks for the typo notification, i've arranged it

  • Ian Vassallo

    I actually got around this issue by adding a line as per below…

    $adSiteGuidLeft13 = $exchangeServer.Site.ObjectGuid.ToString().Replace(“-”,”").Substring(0, 13);
    $UserName = “extest_” + $adSiteGuidLeft13;
    $SamAccountName = “extest_” + $adSiteGuidLeft13;
    $UserPrincipalName =  $SamAccountName + “@” + $exchangeserver.Domain
    > $OrganizationalUnit = $exchangeserver.Domain + “/” + $OrganizationalUnit

  • http://whygoogle.me/ akhater

    Thank you Ian for sharing the solution!

    I will give it a go

  • http://www.facebook.com/Jaffa374 James Collins

     THANKYOU!!!!! I did every single fix I can find with the OU’s, adding bits to the script, nothing, but yours did it! Finally I can sort autodiscover out :)

Content Twitter

RSS Feed

RSS by email