The script below sets the GALDownload Initial Delay key in the registry to force the Lync client to download the address book immediately after signing in.
It then enumerates all the SIP_* sub-folders in the C:\Users\%username%\App Data\Local\Microsoft\Office.0\Lync folder and deletes the ABS__sipdomain.cache file which makes up the local Lync 2013 address book and the GAL*.* files that make up the local Lync 2010 address book.
The entire risk arising out of the use or performance of the sample scripts and documentation remains with you.
In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.
Also, you receive the following notification in the Lync 2010 client or in the Communicator client: Cannot synchronize with the corporate address book.
Occasionally, if the address book is corrupted, Lync won’t replace it and you’ll need to wipe it out manually.
The Lync address book process can be very vague about the locations it collects the information from and the priority it applies to conflicting information.
When information is changed in AD it can be very frustrating for administrators when it is updated and shows the new information for some but not others.
As of this writing it seems the information closest to the user takes the highest priority.
A local Outlook Contact will override the local Lync Address Book.