Wednesday, June 22, 2011

SCOM and the Exchange Test CAS Connectivity User Account

This is just a quick post to highlight an issue that I've seen in 3 out of the last 5 SCOM installations that I have been involved with that have Exchange 2010 as their messaging environment.

A pre-requisite for the Exchange 2010 Management Pack is that a test mailbox account be setup for synthetic transactions using an existing Exchange 2010 powershell script that comes bundled with the Exchange 2010 installation called:

'New-TestCasConnectivityUser.Ps1'

Below are the instructions from the Exchange 2010 Management Pack guide on how to create the test account using the above script:
 
In this procedure you create test mailboxes for Outlook Web App, Exchange ActiveSync, and Exchange Web Services to monitor connectivity by using PowerShell to run the New-TestCasConnectivityUser.ps1 script.

1. Open the Exchange Management Shell.

2. In the Shell, change directory to the C:\ Program Files\Microsoft\Exchange Server\V14\Scripts folder by running the following command:

Set-Location “C:\Program Files\Microsoft\Exchange Server\V14\Scripts”

3. Run the test-user script using the following command:

New-TestCasConnectivityUser.ps1

4. Follow the on-screen installation instructions in the Shell to create the test mailbox. You'll be prompted to enter a temporary secure password for creating test users. You'll also be prompted to specify the Mailbox server where you want the test user created. 

5. Repeat this process on an Exchange 2010 Mailbox server in each Active Directory site that you want to test.


When following these instructions, you might get hit with the following error:

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

The solution that I have found to this problem has been to modify the New-TestCasConnectivity.Ps1 script and remove the parameter '-OrganisationalUnit:$OrganisationalUnit'

This parameter is responsible for specifying the OU that the new account will be created into and when it is removed from the script, the script simply runs and installs the account into the default 'Users' OU as it should.

I came across this solution from the following blog post:

http://www.definit.co.uk/2011/03/exchange-2010-createtestuser-mailbox-could-not-be-created-verify-that-ou-users-exists-and-that-password-meets-complexity-requirements/

Hope this helps!

2 comments:

  1. i cannot get this to work, the ps1 script is located on drive D and not C. Powershell does not run scripts on different drive
    Please assist

    ReplyDelete
  2. Yes, scripts will run from the D: drive as well; just look for the Scripts folder within the Exchange install directory.
    I found that the easiest way to run this script is to just put the full path to the OU.

    New-TestCasConnectivity.Ps1 -OrganizationalUnit "cn=users,dc=domain,dc=local"

    Dan

    ReplyDelete