Sunday, June 3, 2012

OCS/ Lync Client address Book showing old data


Hi Readers,

Want to share the below batch script that we use when address book gets out of sync, some times user complains in our environment that he or she is not able to see new titles of the user although it is populated in outlook GAL.

1.      Exit user’s communicator.
2.      Run the following file from an admin/elevated command prompt: (Batch file)
------------------------------------------------------------------------------------------------------------------
@echo off
echo Clearing Address Books...
reg add HKCU\Software\Policies\Microsoft\Communicator /v GALDownloadInitialDelay /t REG_DWORD /d 0 /f
If %errorlevel%==1 goto Error
if "%LOCALAPPDATA%"=="" Set LOCALAPPDATA=%USERPROFILE%\Local Settings\Application Data
dir "%LOCALAPPDATA%\Microsoft\Communicator\sip_*" /b > list.txt
FOR /F "tokens=1" %%i in (list.txt) do del "%LOCALAPPDATA%\Microsoft\Communicator\%%i\gal*.*"
echo.
echo Sign out of Lync and sign back in to download the current address book.
goto End
:Error
echo You must run this command from an elevated Command Prompt.
echo.
:End
------------------------------------------------------------------------------------------------------------------------------
3.      Launch communicator and ask user to sign in.
4.      Check whether the Galcontacts.db file has been downloaded.
Galcontacts.db path:
  • ·         In XP:- C:\Documents and Settings\\Local Settings\Application Data\Microsoft\Communicator\\
  • ·         In Win 7:- C:\Users\\AppData\Local\Microsoft\ Communicator\\
5.      Run the following file from an admin/elevated command prompt:(This step is so that Gal is not downloaded everytime)
------------------------------------------------------------------------------------------------------------------------------
@echo off
echo Clearing Communicator Address Books...
reg delete HKCU\Software\Policies\Microsoft\Communicator /v GALDownloadInitialDelay /f
If %errorlevel%==1 goto Error
echo.
goto End
:Error
echo You must run this command from an elevated Command Prompt.
echo.
:End
-------------------------------------------------------
found on Some where on Net but modified a bit & included second batch file so that Gal is not downloaded again & again.

Thanks
Vikas

1 comment:

  1. Hey There. I found your blog using msn. This is
    an extremely well written article. I'll make sure
    to bookmark it and return to read more of your useful information.

    Thanks for the post. I'll certainly return.

    ReplyDelete