Bulk-Uploads of Lync Phone Edition Updates

For environments with only a few Front-End pools applying device updates is a fairly simple process. You run the Import-CsDeviceUpdate cmdlet a few times to cover each phone vendor and you're done, but I've found that once you have a number of pools to update this process becomes incredibly tedious. In order to expedite this I've created a simple little PowerShell script which will search the environment for all Front-End pools and upload all the .cab files to each FE.

You can copy this text and save it as a .ps1 file on your Lync server.

Get-CsService -WebServer | Select PoolFQDN | ForEach {
	Import-CsDeviceUpdate -Identity ('WebServer:' + $_.PoolFQDN) -FileName Aastra.cab
	Import-CsDeviceUpdate -Identity ('WebServer:' + $_.PoolFQDN) -FileName HP.cab
	Import-CsDeviceUpdate -Identity ('WebServer:' + $_.PoolFQDN) -FileName Polycom.cab
	Import-CsDeviceUpdate -Identity ('WebServer:' + $_.PoolFQDN) -FileName Tanjay.cab

The only actions required from the admin are:

  1. Download each of the Lync Phone Edition packages.
  2. Extract each UCUpdates.cab files to a single common folder. Rename them as follows: Aastra.cab, HP.cab, Polycom.cab, Tanjay.cab
  3. Open the Lync Management Shell, and CD into the folder where the .cab files were extracted.
  4. Launch the script.

    OCS 2007 R2 Cumulative Update 6 and Stored Procedure Mismatches

    Something not mentioned in the release notes of Cumulative Update (CU6) is that there is a dependency on running the new OCS2009-DBUpgrade.msi before any server updates. If you try to run the ServerUpdateInstaller.exe and apply the server updates without first running the database package you may see an error like this:

    Event ID: 30968
    Source: Live Communications User Services
    Details: The component Live Communications User Services reported a critical error: code C3EE78F8 (Enterprise Edition Server successfully registered with the back-end, but a stored procedure version mismatch was detected. The service will not start until this problem is resolved. Cause: The database schema and the Enterprise Edition Server were updated by different installation packages. Resolution: Ensure both the Enterprise Edition Server and back-end were installed or modified by the same installation package. The service has to stop.

    Obviously the error verbiage is a bit outdated with references to LCS, but the error is correct - there is a mismatch between the stored procedure versions which makes the Front-End service to fail to start.

    To avoid the issue be sure to apply the latest OCS2009-DBUpgrade.msi package before updating any Front-End servers.