I ran into a situation where I needed to force the address book to refresh on a computer that had the Lync client installed. The process to do so isn’t well documented, so I decided to create this post in case anyone else has a similar requirement. Here’s how you force the address book to refresh on a Lync Client.
Force the Lync Client to Immediately Download the Address Book
The first thing you’ll need to do is force the Lync Client to immediately download the address book. To do so, you’ll need a registry key on the computer where you want to force the address book refresh. You can use the following command to create the registry key:
reg add HKCU\Software\Policies\Microsoft\Communicator /v GalDownloadInitialDelay /t REG_DWORD /d 0 /f
The above command must be run with local Administrator credentials.
Force the Lync Client to Download a New Address Book File
As you may know, by default the Lync Client check for changes to the GAL between 1 and 60 minutes. Therefore, the next step is to force the Lync Client to download a new address book file. To do so, you’ll need to follow these steps:
- Exit the Lync Client
- Manually delete the GalContacts.db and GalContacts.db.idx files
The location of these files is dependent on the operating system on the client:
- For Windows XP, the location will be %userprofile%\Local Settings\Application Data\Microsoft\Communicator\[email protected]
- For Windows Vista and Windows 7, the location will be %userprofile%\AppData\Local\Microsoft\Communicator\[email protected]
In both cases, you will need to replace the [email protected] with the SIP address of the user in question. For example, to do so for a user that has a SIP address of [email protected], you would replace the [email protected] with [email protected]
del %LOCALAPPDATA%\Microsoft\Communicator\*.db /s /q del %LOCALAPPDATA%\Microsoft\Communicator\*.db.idx /s /q
At this point, the Lync Client will have an up-to-date copy of the Address Book, that is, it will match whatever the Address Book server has (don’t forget that there is an interval in which the Address Book server gets it’s information from Active Directory.
If you recently changed information in Active Directory, and you cannot wait for the Address Book server to synchronize, you can use the Update-CsAddressBook cmdlet to force it.
Thanks to policelli for the original post!