Troubleshooting Outlook Anywhere (Outlook RPC-over-HTTPS)

This is an unordered list of tools and functionality that is handy when troubleshooting Outlook Anywhere or Outlook RPC-over-HTTPS as it was previously known.

  • Wireshark
    Excellent network protocol analyzer, use it to see what Outlook and Exchange send over the wire. It is possible to configure Wireshark to decrypt an SSL stream, I will post a how-to about this soon.
  • Outlook Debug Logging
    Enable from ToolsàOptionsàOtheràAdvanced Options…àEnable logging (troubleshooting)
    This will generate log files in the user’s temp folder as well as events in the Event Log.
  • Outlook Connection Status/Test E-Mail AutoConfiguration…
    Access by right clicking the Outlook icon in the system tray/notification area while pressing CTRL.
    In the Connection Status window you can see server names, connection types, network interface, protocols, status and statistics. Also you can view the activity in your local mailbox. The Test E-Mail AutoConfiguration option shows you all the information delivered by the Autodiscover web service.
  • Outlook RPC diag
    Start Outlook with the command line parameter /rpcdiag, eg. outlook.exe /rpcdiag. This brings up the Connection Status box.
  • IIS Log files
    Usually located in your inetpub directory these files show you the requests that you web server receives, as well as the return codes the server responded with.
  • Windows Event Logs
    Look here for errors from the web server or Outlook, or any other component associated with Outlook Anywhere functionality.
  • Test-OutlookWebServices cmdlet
    This cmdlet runs a test on the Autodiscovery web service and outputs the results.


Determining free space in Exchange Mailbox Databases using PowerShell

Exchange Mailbox Databases (EDB files) increase in size automatically when required, but they never decrease in size without administrator intervention. Exchange does its best to use up the free space inside the database, the so called white space, but that is not always possible. Because of this you are left with database files that just continue to increase in size as data is added to them, even if a fair amount of free space is available inside the database file. So sometimes you have to take the database offline and manually defragment it using eseutil.exe. By doing this your databases will be defragmented and a new file created which does not have any white space in it. This new file will be automatically moved to the location of your old file that will be deleted. So how do you determine when it is time to defragment your databases, and how do you know how much your files will decrease in size?

The first question is up to you to decide but the second can be easily answered by a PowerShell cmdlet:

Get-EventLog -LogName Application -New 1024 | where { $_.EventID -eq 1221 -and $_.TimeGenerated -ge [DateTime]::Now.AddHours(-24) } | ft TimeGenerated,Message -Wrap -auto

I also have a script that does some formatting of the results, making it easier to export to CSV or XML e.g.

   1: $colResults = @()

   2: $events = Get-EventLog -LogName Application -New 1024 | where { $_.EventID -eq 1221 -and $_.TimeGenerated -ge [DateTime]::Now.AddHours(-24) }

   3: $events | ForEach `

   4: {

   5:  $objEvent = New-Object System.Object

   6:  $objEvent | Add-Member -type NoteProperty -name Date-Time -value $_.TimeGenerated

   7:  $objEvent | Add-Member -type NoteProperty -name Database -value $_.ReplacementStrings[1]

   8:  $objEvent | Add-Member -type NoteProperty -name "Free Space (MB)" -value $_.ReplacementStrings[0]

   9:  $colResults += $objEvent

  10: }

  11: $colResults | Sort-Object Database | ft -autosize

Happy defragmenting!