Save the script above as ClearLyncAddressBook.bat and run it from an elevated Command Prompt.
If '%LOCALAPPDATA%'='' Set LOCALAPPDATA=%USERPROFILE%\Local Settings\Application Dataĭir '%LOCALAPPDATA%\Microsoft\Communicator\sip_*' /b > list.txtįOR /F 'tokens=1' %%i in (list.txt) do del '%LOCALAPPDATA%\Microsoft\Communicator\%%i\gal*.*'Įcho Sign out of Lync and sign back in to download the current address book.Įcho You must run this command from an elevated Command Prompt. Reg add HKCU\Software\Policies\Microsoft\Communicator /v GALDownloadInitialDelay /t REG_DWORD /d 0 /f It then enumerates all the SIP_* folders in the C:\Users\ username\AppData\Local\Microsoft\Communicator folder and deletes the GalContacts.db and GalContacts.db.idx files which make up the Lync address off My script sets a GALDownloadInitialDelay key in the registry to force the Lync client to download the address book immediately after signing in. Lync Server MVP Jeff Schertz wrote about this process in great detail in his post, Updating the Lync 2010 Address Book. The address book is then downloaded locally by the Lync client in a randomized schedule from 1 to 60 minutes after the the user signs in.