Force Lync 2013 Clients to immediate download address book


Hello My friends,

today’s port we will see how to force Lync 2013 clients to immediate download address book.

thanks for Jeff Guillet Lync MVP for writing script.


The script below sets the GALDownloadInitialDelay 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%\AppData\Local\Microsoft\Office\15.0\Lync folder and deletes theABS__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.

@echo off
rem Check if Lync is running, exit if it is…
tasklist /fi "IMAGENAME eq lync.exe" | find "lync.exe" >nul
If %errorlevel%==0 goto LyncIsRunningError
rem Add x86 GALDownloadInitialDelay registry entry
reg add HKCU\Software\Policies\Microsoft\Communicator /v GALDownloadInitialDelay /t REG_DWORD /d 0 /f >nul
If %errorlevel%==1 goto ElevationError
rem Add WOW64 GALDownloadInitialDelay registry entry if x64
If %PROCESSOR_ARCHITECTURE%==AMD64 reg add HKCU\Software\Wow6432Node\Policies\Microsoft\Communicator /v GALDownloadInitialDelay /t REG_DWORD /d 0 /f >nul
If "%LOCALAPPDATA%"=="" Set LOCALAPPDATA=%USERPROFILE%\Local Settings\Application Data
dir "%LOCALAPPDATA%\Microsoft\Office\15.0\Lync\sip_*" /b > list.txt
FOR /F "tokens=1" %%i in (list.txt) do (
rem Delete the Lync Server 2010 address book…
If Exist "%LOCALAPPDATA%\Microsoft\Office\15.0\Lync\%%i\gal*.*" del "%LOCALAPPDATA%\Microsoft\Office\15.0\Lync\%%i\gal*.*"
rem Delete the Lync Server 2013 address book…
If Exist "%LOCALAPPDATA%\Microsoft\Office\15.0\Lync\%%i\abs*.cache" del "%LOCALAPPDATA%\Microsoft\Office\15.0\Lync\%%i\abs*.cache"
del list.txt
echo Clearing Lync 2013 Address Books…  Done!
echo Sign back into Lync 2013 to download the current address book.
goto End
echo ERROR: You must run this command from an elevated Command Prompt.
goto End
echo ERROR: You must exit Lync 2013 before running this command. Right-click the Lync icon and choose Exit.

sace this script as .bat file in somewhere for example “c:\Lync 2013 Force Client to Download Address Book.bat


Run cmd As Administrator



you will need to exit Lync 2013 clients first or you will get the below error.





then run the script again.



after logging back in Lync you will see User@Doman..FQDN is created






About Hany Abd El-Wahab

Hany has 9+ years of experience as IT Solution Architect, Consultation and Training. through a broad range of vendors and technologies (Microsoft, VMware, EMC, Symantec and more). Also certified (Microsoft x4 MCSE, 2x MCITP, 15x MCTS), (VMware VCP-DCV, x2 VCP, 3x VCA, VCSTP), (EMC ISM, VNX-IE), DELL(DCSE-E, S) and more...
This entry was posted in Lync 2013. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s