Exchange 2010/2013 - Issue of Test-OutlookWebServices failed

Sumit GuptaSystem and Virtualization Engineer
Published:
When you try to run the Test-OutlookWebServices script on a newly installed Exchange 2010 Server, the following error may occur in the Exchange Management Shell (EMS)

The Microsoft Exchange Server 2010 Management Pack for System Center Operations Manager runs Exchange Management Shell cmdlets to monitor your Exchange organization. Running cmdlets triggers one or more Operations Manager alerts if a problem is detected.

Use the Test-OutlookConnectivity cmdlet to test end-to-end Microsoft Outlook client connectivity in the Microsoft Exchange Server 2013 organization. This includes testing for both Outlook Anywhere (RPC/HTTP) and MAPI/HTTP connections.

When you try to run the Test-OutlookWebServices script on a newly installed Exchange 2010 Server, the following error may occur in the Exchange Management Shell (EMS) 

[PS] C:\Windows\system32>Test-OutlookWebServices

Open in new window


DEC-0082.jpg
If this is the first time you try to run the test, this typically means you haven’t configured the test account yet. You should run the new-TestCasConnectivityUser.ps1 script first. Follow these instructions to make it work:

  1. Open a Exchange Management Shell on the Exchange Server
  2. In my case Navigate to D:\Program Files\Microsoft Exchange Server\ (or any other folder where you installed Exchange
  3. Navigate to the folder Scripts
  4. Run .\new-TestCasConnectivityUser.ps1
  5. When asked, type a strong password (Exchange 2010 will change this password automatically at a later time)
Normally it should be fixed but if not you will get another error: 
CreateTestUser : Mailbox could not be created. Verify that OU ( Users ) exists and that password meets complexity requirements.
                      At C:\Program Files\Microsoft\Exchange Server\V14\Scripts\new-TestCasConnectivityUser.ps1:255 char:27
                      +   $result = CreateTestUser <<<<  $exchangeServer $mailboxServer $securePassword $OrganizationalUnit $UMDialPlan $UMExtension $Prompt
                      + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
                      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,CreateTestUser

Open in new window


DEC-0083.jpgTo Resolve this issue, I opened the script in notepad and found the line beginning "new-mailbox" – and deleted the parameter "–OrgainisationalUnit:$OrganistationalUnit". This means the new user defaults to the default OU – Users!

DEC-0084.jpgRun the script again and it should be successful.
1
5,121 Views
Sumit GuptaSystem and Virtualization Engineer

Comments (1)

Doug WilliamsMessaging Engineer

Commented:
Somewhat unrelated but why would the default container Users NOT exist in your AD?  One would have to delete this automatically created (and frequently referenced by many standard scripts) OU, but what would that gain you?  Certainly if you want to enhances security by making sure all important accounts, even regular user accounts are in specific OU's for GPO purposes, you could accomplish that without deleting the Users OU.

I'm just curious about your organization's philosophy, not being critical

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.