Installing Lync Server 2013 Administrative Tools using command line

Hi All

I recently needed to script up the installation of Lync Server 2013 Administration Tools on a remote administration server so I could make it repeatable, and so I thought I'd share. Unfortunately it is not simply just running the admintools.msi. It's not much more, but there are a few pre-reqs you need to make sure are installed. Enjoy.

Happy Skype/Lync'ing...

Steve

PS Don't forget to test in a test environment before running in Prod :)

Run these commands in a Command Prompt as Administrator.

REM Mount Lync ISO as F:\

f:

cd f:\Setup\amd64

 

REM install visual c++ redistributable

start /max /wait vcredist_x64.exe /install /quiet

 

REM install SQL System CLR runtime

start /max /wait msiexec /i SQLSysClrTypes.msi /qb

 

REM install SharedManagementObjects.msi

start /max /wait msiexec /i SharedManagementObjects.msi /qb

 

REM install Admin Tool components (Lync core components is also required)

cd f:\Setup\amd64\Setup

start /max /wait msiexec /i OCSCore.msi /qb

start /max /wait msiexec /i AdminTools.msi /qb

 

REM go to location on Server where latest CU file is saved.

cd /d c:\software

 

REM finally install the latest cumulative update…

start /max /wait LyncServerUpdateInstaller.exe /silentmode

 

Version 2 approach

To make this more graceful, copy the vcredist_x64.exe, SQLSysClrTypes.msi, SharedManagementObjects.msi, OCSCore.msi, AdminTools.msi and LyncServerUpdateInstaller.exe to a folder like c:\Lync2013AdminTools.

Then run as Admin in Command Prompt the following .cmd file.

NOTE: You should be able to use this script as a package in SCCM, play around with it running psexec with the -s system flag to test how SCCM would run using the system account.

 

@echo off

set LogFile=%Temp%\InstallLyncAdminTools.log

dir > %LogFile%

REM install visual c++ redistributable
date /t >> %LogFile%
time /t >> %LogFile%
echo Installing Visual C++ Redistributable >> %LogFile%
start /min /wait vcredist_x64.exe /install /quiet /log %temp%\LyncAdminTools-VCRedist.log

REM install SQL System CLR Runtime
date /t >> %LogFile%
time /t >> %LogFile%
echo Installing SQL System CLR Runtime >> %LogFile%
start /min /wait msiexec /i SQLSysClrTypes.msi /qb /log %temp%\LyncAdminTools-SQLSysCLRTypes.log

REM install ShareManagementObjects
date /t >> %LogFile%
time /t >> %LogFile%
echo Installing SharedManagementObjects >> %LogFile%
start /min /wait msiexec /i SharedManagementObjects.msi /qb /log %temp%\LyncAdminTools-SharedManagementObjects.log

REM install Core Components
date /t >> %LogFile%
time /t >> %LogFile%
echo Installing Core Components >> %LogFile%
start /min /wait msiexec /i OCSCore.msi /qb /log %temp%\LyncAdminTools-OCSCore.log

REM install Core Components
date /t >> %LogFile%
time /t >> %LogFile%
echo Installing Core Components >> %LogFile%
start /min /wait msiexec /i AdminTools.msi /qb /log %temp%\LyncAdminTools-Admintools.log

REM install Lync CU
date /t >> %LogFile%
time /t >> %LogFile%
echo Installing CU >> %LogFile%
start /min /wait LyncServerUpdateInstaller.exe /silentmode