We came across an issue recently when trying to create a test mailbox for our SCOM monitoring.
On the Exchange Sever we ran the following script to create the test mailbox “New-TestCasConnectivityUser.PS1”
However the command produced the following error “CreateTestUser : Mailbox could not be created. Verify that OU ( Users ) exists and that password meets complexity requirements.”
To resolve this we specified the DN name of the OU in the New-TestCasConnectivityUser.PS1 script by editing the following line in the PS1 script.
$OrganizationalUnit = “Users”
We changed this to
$OrganizationalUnit = “CN=Users,DC=Domain,DC=CO,DC=UK”
We then re-ran the script and all worked fine