Wednesday 6 April 2016

Installing Lync Modules on Administrative Consoles

In this series of Blog posts I will explain how we can use the Lync Powershell Modules to help automate some Bulk Lync user tasks. While most of these task can be completed using PowerShell Remoting using the OCSPowershell provider endpoint provided by the Lync server, some of the error forwarding through the proxy doesn't work as expected. In this case we can utilise the Lync Management Shell locally on our administration console.

The Lync Management Shell is a PowerShell session with the Lync Module imported at runtime. this means we can also use Lync CmdLets within the PowerShell console or ISE.

To install the Lync Modules on your administration console you can use one of two methods:
  1. Run the Lync Setup.exe process and select Install 'Administrative Tools'.
  2. Only install the required MSI's from the Install set.
Both methods above would require the Lync Server install set.

I opted for option 2 since it requires a smaller set of files rather than the full installation media, and if required can be packaged for Domain deployment using existing enterprise tools such as SCCM or GPP. But for this example I will installing the tools interactively.

The MSI's required can be found in Setup\amd64\Setup and need to be installed in the following order:
  1. Microsoft Visual C++ 2012 Redistributable (x64) v11.0.50727 (vcredist_x64.msi)
  2. Microsoft Lync Server 2013, Core Components (ocscore.msi)
  3. Microsoft System CLR Types for SQL Server 2012 (x64) (SQLSysClrTypes.msi)
  4. Microsoft SQL Server 2012 Management Objects  (x64) (SharedManagementObjects.msi)
  5. Microsoft Lync Server 2013, Administrative Tools (admintools.msi)
After Installing these components the Lync Module is installed in

C:\Program Files\Common Files\Microsoft Lync Server 2013\Modules\Lync

and this path is added to the PSModulePath. You can check this by running 

$env:PSModulePath

in your own PowerShell session.

You can check your Lync Module is installed at runtime by running the following in a new PowerShell session:

Get-Module -ListAvailable 

and you should see the Lync Module in the list.


Now you have the Lync Module installed locally you can check which CmdLets are now available to you from your administration console by entering the following:

(Get-Command -Module Lync).Count

shows us that 739 new Commands have been added using the Lync module and we can get a complete list of commands using:

Get-Command -Module Lync

That completes this blog on installing the Lync Module on your administration console. More posts in this series will follow shortly here.

No comments:

Post a Comment