Clearing AutoComplete and other Recipient Caches

Exchange 2010 LogoAnyone who has participated in migrations or transitions to Exchange has most likely encountered or has had to work around potential issues caused by the nickname cache. A “cache,” also known by its file extension, NK2 in older Outlook clients, is a convenience feature in Outlook and Outlook WebApp (OWA) which lets users pick recipients from a list of frequently-used recipients. This list is displayed when the end user types in the first few letters.

The potential issue revolves around end users using those lists to send messages, as the list contains cached recipient information. Because this information is static, it may become invalid at some point. Thus, when users pick recipients when sending messages, they may be sending messages to non-existent recipients or invalid e-mail addresses, which create issues like non-delivery of e-mail.

Read the full article over on ENow Solutions Engine blog.

Clean-AutoComplete

Using the script mentioned in the article, which can be used to clear cached recipient information, is straightforward. It requires Exchange 2010 or later and Exchange Web Services Managed API 1.2 (or later) which you can download here. Alternatively, you can copy the Microsoft.Exchange.WebServices.DLL with the script as it will also look for it in the current folder.

The script Clean-AutoComplete.ps1 has the following syntax:

Clear-AutoComplete.ps1 [-Mailbox] <String> [-Server <String>] [-Impersonation] [-Credentials <PSCredential>] [-Type <Array>]

Where:

  • Mailbox is the name or e-mail address of the mailbox.
  • Server is the name of the Client Access Server to access for Exchange Web Services. When omitted, the script will use AutoDiscover.
  • Switch Impersonation specifies if impersonation will be used for mailbox access, otherwise the current user context will be used.
  • Credentials specifies the user credentials to use.
  • Type specifies what cached recipient information to clear. Options are Outlook  (Outlook AutoComplete stream), OWA (OWA Autocomplete stream), SuggestedContacts, RecipientCache or All. Default is Outlook,OWA.

So for example, suppose you want to clear the Autocomplete stream used by Outlook on a mailbox, you can use:

Clear-AutoComplete.ps1 -Mailbox Olrik -Type Outlook -Verbose

ScreenCapTo remove the Autocomplete stream used by OWA on your Office 365 account, you can use:

Clear-AutoComplete.ps1 -Mailbox olrik@office365tenant.com –Credentials (Get-Credential) –Type OWA

Feedback
Feedback is welcomed through the comments. If you got scripting suggestions or questions, do not hesitate using the contact form.

Download
You can download the script from my Technet Gallery here.

Revision History
See Technet Gallery page.

 

 

Outlook versions supporting Personal Archives and Retention Policies

Outlook 2013 IconIn an earlier article here, I mentioned which Outlook 2010 versions were eligible for Personal Archives.

Now, with the release of Office 2013, and Outlook 2013 in particular, it’s good to get an update on the Outlook versions and their support of Personal Archives and Retention Policies in Exchange Server 2010 or Exchange Server 2013.

The following Outlook versions support Personal Archives and Retention Policies:

Retail Licenses Volume Licenses
  • Outlook 2013 stand-alone
  • Outlook 2010 stand-alone
  • Outlook 2007 stand-alone
  • Outlook 2007 included with Microsoft Office Ultimate 2007
  • Outlook 2013 stand-alone
  • Outlook 2013 included with Microsoft Office Professional Plus 2013
  • Outlook 2010 stand-alone
  • Outlook 2010 included with Microsoft Office Professional Plus 2010
  • Outlook 2007 stand-alone
  • Outlook 2007 included with Microsoft Office Professional Plus 2007
  • Outlook 2007 included with Microsoft Office Enterprise 2007

Few notes:

  • As mentioned here, Outlook 2007 doesn’t support adjusting retention policies;
  • Personal Archives and Retention Policies require an Microsoft Exchange Server Enterprise Client Access License.

The case of the not updating Outlook for Mac 2011

exchange2007logo2[1]I had contact with a Twitter user on an issue with Outlook for Mac 2011 talking against Exchange Server 2007 on Small Business Server 2008.

When configuring a new account, Outlook for Mac reported “Account cannot be added.  Note that Outlook 2011 requires Exchange Server 2007 SP1 Update Rollup 4 or later.”

image

However, that couldn’t be right because that user claimed to be running a higher version of Exchange 2007. After manually entering the server name, a connection could be established and an initial download of folders and contents took place. However, items weren’t updated and contacts and calendar remained empty.

After trying and checking some things, I asked to turn on Outlook for Mac’s logging hoping to find something in the Exchange Web Services log (Outlook for Mac 2011 is EWS based). You can enable logging by checking Window > Error Log > Errors > Settings > Turn on logging for troubleshooting. After a while I was sent the log file Microsoft Outlook_Troubleshooting_0.log which contained the following excerpt:

2013-01-24 08:55:34.392,0xFFFFFFFF,Outlook Exchange Web Services,Info,"EWS: Response data received on thread=0x7d27bdb4, XML data=
<?xml version=""1.0"" encoding=""utf-8""?><soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""><soap:Header><t:ServerVersionInfo MajorVersion=""8"" MinorVersion=""3"" MajorBuildNumber=""297"" MinorBuildNumber=""0"" Version=""Exchange2007_SP1"" xmlns:t=""http://schemas.microsoft.com/exchange/services/2006/types"" /></soap:Header>

First, Exchange reports version 8.3.297.0 which corresponds with Exchange 2007 SP3 RU9 (EWS can report slightly different version than actual version), so something else was wrong while that’s well above Exchange 2007 SP1 RU4.

2013-01-24 08:55:39.355,0xFFFFFFFF,Outlook Exchange Web Services,Info,"EWS: Sending request on connection=0x7dc89be8, URL=/EWS/Exchange.asmx, SoapAction=""http://schemas.microsoft.com/exchange/services/2006/messages/SyncFolderItems"""
2013-01-24 08:55:39.358,0xFFFFFFFF,Outlook Exchange Web Services,Info,EWS: Received response on connection=0x7d31dae8; status=500
..
2013-01-24 08:55:49.861,0xFFFFFFFF,Outlook Exchange Web Services,Info,"EWS: Sending request on connection=0x7d71a648, URL=/EWS/Exchange.asmx, SoapAction=""http://schemas.microsoft.com/exchange/services/2006/messages/GetItem"""	
2013-01-24 08:55:49.863,0xFFFFFFFF,Outlook Exchange Web Services,Info,EWS: Received response on connection=0x7dc26638; status=500
..
2013-01-24 08:55:39.359,0xFFFFFFFF,Outlook Exchange Web Services,Info,"EWS: Sending request on connection=0x7d31dae8, URL=/EWS/Exchange.asmx, SoapAction=""http://schemas.microsoft.com/exchange/services/2006/messages/GetItem"""	
2013-01-24 08:55:39.477,0xFFFFFFFF,Outlook Exchange Web Services,Info,EWS: Received response on connection=0x7d7005c8; status=200

I then noticed various EWS requests returned http status code 200 (means OK) but also 500’s, which correspond to “Internal Server Error”. It happened after various requests (e.g. SyncFolderItems, GetFolder, GetItem) but not for all requests.

Now, code 500 isn’t very helpful (general terminal failure) and a quick restart of IIS with iisreset /restart /noforce didn’t solve things.

After some digging it turned out the seemingly unrelated KB2264110 pointed in the right direction. I say unrelated, because it’s on messages not being updated on Blackberry Internet Service (BIS) after installing Exchange Server 2007 SP2. Turned out the performance counters on the Exchange 2007 server were corrupt and rebuilding them solved the issue.

To rebuild the performance libraries, perform the following steps from an elevated command prompt:

  1. CD %SystemRoot%\System32
  2. Run lodctr /R (/R is case-sensitive) which will rebuild all known counters
  3. Run wmiadap /f which will update the WMI performance classes
  4. Restart the Exchange 2007 server

After these steps, Outlook for Mac 2011 could sync again with Exchange Server 2007 SP3.

Exchange/Lync/Office/Sharepoint 2013 Visio Stencil Available

Microsoft published the integral Visio stencil for Exchange 2013 and Lync 2013. The stencil contains a whopping 317 icons to aid you in developing visual communications on design or architecture with regards to Exchange, Lync, Sharepoint or Office 2013.

image

To use the stencil, drop a copy in the “My Shapes” folder located in your “My Documents” folder and activate it using the Shapes window selecting More Shapes >My Shapes > FLEX_Stencil_112012 .

You can download the stencil here.

Important Hotfix for Outlook 2013 Preview

Microsoft released a quick fix for a nasty bug in Outlook 2013 Preview, part of the Office Professional Plus 2013 Preview. The related knowledgebase article is kb2737132.

Note: Despite the warning that goes with pre-release software about not using it in production environments, I assume Microsoft knows people will and decided to produce a hotfix so quickly, which is quite unusual for preview software, also looking at the potential consequences.

The bug causes everything, i.e. e-mail, contacts, appointments and tasks, to be deleted permanently from an Exchange server when using the Cleanup Tools from Outlook. Nothing is recoverable through the Recover Deleted Items option.

To install the hotfix, follow one of the links below, depending on your architecture:

Storing Replies with Received Items

Not directly Exchange related but mail-related, I’d like to mention a function in Outlook which could make organizing e-mail a lot easier, depending on if and how you organize them of course.

Normally, when replying to an e-mail in Outlook, it will store a copy of that message in the Sent Items folder of that account. That is, assuming you have 1 Exchange account set up or multiple in conjunction with the DelegateSentItemsStyle setting as described here.

Now after a while, your Sent Items folder will be full of messages sent over the past period. For received messages you may have created folders and perhaps rules to automatically organize incoming e-mail in projects or customers folders. Wouldn’t it be nice if you can keep those messages with their replies automatically, instead of having to organize your Sent Items by manually distributing its contents over the projects and customers folders?

Well, you can actually, and it’s a setting in Outlook. Open up the File > Options and select the Mail settings. In the right pane, check the When replying to a message that is not in the Inbox, save the reply in the same folder setting:

image

Note that this setting in pre-Outlook 2010 versions is called In Folders Other Than The Inbox, Save Replies With Original Message.

Now when you reply to a message, it will save the reply in the same folder unless the message was in the Inbox.

Note that this setting will apply to all accounts and personal folders.

Office 365 and “There are no items to show in this folder”

Be advised that when accessing shared mailboxes on Office 365 using Outlook in online mode, you may experience an issue with Outlook not properly updating the mailbox view.

Instead, Outlook will return a “There are no items to show in this view” message. The folder in the folder navigation pane displayed the proper number of (unread) items in the folder.

This could be the symptom of an issue which was already solved in Exchange 2010 Service Pack 1 Rollup 5. It seems the Office 365 data centers are not running a current version of Exchange, as today I received the message the Office 365 environment is currently being upgraded with Exchange 2010 Service Pack 2. The message also mentions the upgrade is to be completed at the end of the month.

More information on the issue in knowledge base articles kb2500648, announcing the fix is included in Exchange 2010 SP1 RU5.

Until then, the suggested workaround is to click one of the columns twice after which Outlook will update the view properly. Of course, you could also enable cached mode, if your setup and company policy permits (e.g. not running Outlook on terminal server).

Delegated Sent and Deleted Items behavior

Many people using Outlook access multiple mailboxes, either because the mailbox is shared or they are a delegate (e.g. they have send-as permissions). What many users find confusing is that by default, Outlook will put the copies of all sent messages in the Sent Items folder of the default account. For example, when Peter sends a message as John, users expect Outlook to put the message in the Sent Items of John. Also, when Peter deletes a message from John’s mailbox, it will end up in Peter’s Deleted Items folder.

image

Luckily, this behavior can be altered for Outlook 2003, Outlook 2007 and Outlook 2010 using two registry settings. In order for these setting to work, Outlook needs to have a certain hotfix; which hotfix depends on the Outlook version used. Note that a later service pack or hotfix may already contain this setting:

To enable the different Sent Items behavior, you need to create or edit the a value named DelegateSentItemsStyle, type REG_DWORD and set it to 1 (default is 0 or not present). The location of the registry value is HKCU\Software\Microsoft\Office\<version>\Outlook\Preferences, where <version> depends on the Outlook version used; use 11 for Outlook 2003, 12 for Outlook 2007 or 14 for Outlook 2010.

To alter the Deleted Items behavior, create or edit a value named DelegateWasteBasketStyle, type REG_DWORD and set it to 4 (default is 8 or not present). The location of the registry value is HKCU\Software\Microsoft\Office\<version>\Outlook\Options\General; for version number use one of the values mentioned before.

After implementing these registry values, either manually or by publishing them in group policies, sent items and deleted items will be stored with the mailbox:

image

Note: these registry keys only work when using Outlook in Cached Mode; more information in kb2703723.

 

Exchange 2010 SP1 Update Rollup 4 Issues

Be advised that in addition to earlier reports, there are not only data loss issues with Exchange 2010 SP1 Rollup 4 when moving folder structures from public folders to mailboxes or other public folders.  Apparantly, data loss can also occur when moving folder structures to PST files. In both cases, only the top folder and messages are moved, subfolders and their contents are not moved but deleted.

On the issue, Microsoft’s Ross Smith said the following:

In SP1 RU4 we addressed the issue where you could not recover deleted public folders from dumpster. However, Outlook incorrectly passes a flag that indicates the item has been deleted when it has not.  As a result, when you perform a copy or move in the manner Jens described, the sub-folders are deleted.  As mentioned previously, you can recover these deleted folders from dumpster.  We’ve contacted the Outlook team to assist in further diagnosis of the issue and to help us determine the right vehicle for a fix, we’ll provide more details soon – in the meantime please open a CSS case.

You can uninstall Rollup 4 from your Exchange servers to prevent potential data loss caused by these issues.

Note that Rollup 5 is scheduled for August, so you might start to wonder what will arrive first, RU5 or RU4v2.

Disabling Distribution Group Expansion in Outlook

A customer was using moderated distribution groups and asked if it was possible to disable the expansion of distribution groups in Outlook. As you probably know, after entering a distribution group in the address bar, Outlook will show a “+” sign next to it which will let you replace the distribution group with all its members as recipients. Especially with moderated distribution groups this might be found an issue, because customers might want to hide membership information from senders.

image

Unfortunately, hiding isn’t  a real option because distribution groups are universal distribution groups and its members are readable. Fiddling around with the ACL sounds like a viable option (remove permissions to read members) but sounds like a potential cause for other issues so I’m not fond of that.

What you could do is remove the option to expand the distribution group setting one of the following a registry keys, depending on your Outlook client version:

Outlook 2010
HKCU\Software\Microsoft\Office\14.0\Outlook\Options\Mail\DisableDLExpansion=1 (REG_DWORD)

Outlook 2007
HKCU\Software\Policies\Microsoft\Office\12.0\Outlook\Options\Mail\DisableDLExpansion=1 (REG_DWORD)

Outlook 2003 or earlier
Outlook 2003 or earlier versions don’t have this option.

After you set this key and restart Outlook, you’ll see the “+” sign is gone:

image

If you want to roll out this change throughout your organization, use this key in a custom GPO template or utilize the GPO templates that ship with Office (Outlk14.adm or Outlk12.adm depending on version) and configure the GPO accordingly.

Be advised that setting this registry key disables expansion for all distribution groups. Specifically disabling it for moderated groups is impossible, since Outlook has – and should have – no knowledge of the type of distribution group.

Note that the distribution group expansion option is something typical of the Windows version of Outlook, since Outlook for Mac nor Outlook WebApp (OWA) have this option.