When we tried to run new-TestCasConnectivityUser.ps1 to create some mailboxes for the test-cmdlets we ran in to some strange problems.
Got an errormessage stating “CreateTestUser : Mailbox could not be created. Verify that OU ‘Users’ exists and that password meets complexity require”
The OU exist and the password is OK… strange. Googled and didn’t find anything that could relate to that problem. Then I started to disect/debug the powershell script…
Ended up with a command like:
$SecurePassword = Read-Host "Enter password" -AsSecureString new-Mailbox -Name:ext_dummy -Alias:ext_dummy -UserPrincipalName:email@example.com -SamAccountName:ext_dummy -Password:$SecurePassword -Database:somestrangeguid -OrganizationalUnit:Users
When running that command it says that “Multiple organizational units match identity “Users”. Specify a unique value.”
OK, we have another OU in the hierarchy named “Users”…
Edited the script and changed the value of $OrganizationalUnit to another OU and did a new test with “get-mailboxServer | .\new-TestCasConnectivityUser.ps1” and a few seconds later we have the users. 🙂