CreateTestUser : Mailbox could not be created. Verify that OU ( Users ) exists and that password meets complexity requirements.
I verified that I could create a user account in the User container in AD just fine using the same password I supplied in the script. Obviously, I had sufficient rights and the password was complex enough.
After examining the new-TestCasConnectivityUser.ps1 script I noticed that the $OrganizationalUnit variable is looking for a match in AD for "Users". A quick search using AD Users and Computers found that the client had many OU's named Users throughout AD. The script was actually bombing out because it didn't know which "Users" OU to use.
The fix is to add the following line below line 171 in the script to make it look for a better (more specific) match:
OrganizationalUnit = "CN=Users,DC=domain,DC=com"Be sure to edit this to match your domain naming context.
Then save the script and run it.
Did you send bugreport to MS to improve the script in the next version?
ReplyDeleteGreat find Jeff. I have not used that script yet
ReplyDeleteDON'T copy and paste the line into your file. Refer to the screenshot instead.
ReplyDeleteA: DN=Domain,DN=com should match YOUR default naming context.
B: It's DC=, not DN=
C: It's CN=Users, not CN-Users (equal not dash)
Thanks, I've updated the article with the corrections.
ReplyDeleteIn fact, you don't need to modify the script. Just use parameter: new-TestCasConnectivityUser.ps1 -OU "MyOU" or -OU "CN=Users,DC=mydomain,DC=com". Don't forget to use "".
ReplyDelete