Script: New-CsFirmware.ps1 – Upload Multiple Lync Phone Edition Firmware Updates to a Single or Multiple Pools
When cumulative updates are released from the Lync Product Group, they often contain firmware updates for Lync Phone Edition devices. The update process is somewhat arduous in that you have to download each update for each device model, extract it, then manually upload each firmware file, test it, then approve it for wide scale release. If you have multiple pools, the updates need to be uploaded to each one so that a copy exists in each Lync file share. And there is no way to select multiple files and upload them, and each file is named ucpdates.cab, so they need to be in separate folders. So, I made this little script to help deal with the upload process.
Create a parent folder called whatever you want. In my example, it is called “CU6 – June 2012”. Inside that folder, I have the Cumulative Update file, LyncServerUpdateInstall.exe, as well as child folders for the various devices. The child folders can be called anything.
Inside each of the child folders, I’ve downloaded the firmware update for that model, run the .exe, and extracted the file back to the same folder. So each folder has the original UCUpdates.exe file that was downloaded, and the ucupdates.cab file that was extracted. This is normal practice for me, even when manually uploading the files. With the newer Polycom VVX and Snom firmware files, they download in different formats. The Snom firmware just comes as the .cab file, while the Polycom VVX comes as a .zip file containing several .cab files. Nothing to do once you download the Snom file, but you do need to unzip the Polycom file.
Next, run the script using
If the script was launched from a plain PowerShell console, the Lync module will be loaded automatically.
Next, you’ll be prompted for the parent folder.
Select the parent folder and click ok. The script will look through the parent folder and all child folders for update files called ucupdates.cab, and will upload them to all pools that it can find.
That’s all there is to it. You will still need to follow the rest of the upgrading process such as configuring test devices, testing, and then approving. Fellow MVP Jeff Schertz has a fabulous blog post, Updating Lync Phone Edition Devices that details the entire process.
You can also include the path to the parent folder when you run the script, such as
.\New-CsFirmware.ps1 -FilesPath "c:\users\lyncent.administrator\desktop\cu6-june 2012"
and the script will skip prompting for the folder.
Will download the firmware for LPE devices, and automatically import them. It does NOT download firmware for SNOM or Polycom VVX devices (yet).
A special shout-out to fellow MVP and Lync MCM Kevin Peters, who gave me the idea to script it out and include all of the child folders and all of the pools.
If you’d like to target just a specific pool for the updated firmware, using the -PoolFqdn parameter with the desired pool FQDN.
Once you’ve deployed the firmware, you can easily see the firmware versions connecting to Lync by using my Get-CsConnections script and specifying the -ClientVersion parameter with a value of “CPE”.
.\Get-CsConnections.ps1 -PoolFqdn mypool.fabrikam.local -ClientVersion CPE
And look at the first table:
Execution Policy: Third-party PowerShell scripts may require that the PowerShell Execution Policy be set to either AllSigned, RemoteSigned, or Unrestricted. The default is Restricted, which prevents scripts – even code signed scripts – from running. For more information about setting your Execution Policy, see Using the Set-ExecutionPolicy Cmdlet.
No real installation required. The script can be run from any machine that has the Lync Core Components installed. As usual, you do need to set your Execution Policy to RemoteSigned or Unrestricted in order to run PowerShell scripts. The script will create a folder called .\Logs, and it will create the transcript file in there for future reference.
Frequently Asked Questions
Question: Will this update Roundtable devices?
Answer: No, but fortunately, fellow Lync MVP Jeff Schertz has an excellent article on how to upgrade those devices at http://blog.schertz.name/2012/02/update-cx5000-rt-firmware/.
Question: My test phones aren’t downloading the right firmware?
Answer: Could be this quirky issue. http://uclobby.com/2013/11/06/lync-phone-edition-test-device-wont-update-to-unapproved-version/
v1.9 – 03-31-2015 – New-CsFirmware.v1.9.zip
v1.8 – 02-08-2015 – New-CsFirmware.v1.8.zip
v1.7 – 05-20-2014 – New-CsFirmware.v1.7.zip
v1.6 – 02-08-2014 – New-CsFirmware.v1.6.zip
v1.5 – 09-09-2013Â – New-CsFirmware.v1.5.zip
v1.4 – 05-10-2013 – New-CsFirmware.v1.4.zip
v1.3 – 10-17-2012 – New-CsFirmware.v1.3.zip
v1.2 – 08-17-2012 – New-CsFirmware.v1.2.zip
v1.1 – 07-10-2012 – New-CsFirmware.v1.1.zip
v1.0 – 06-30-2012 – New-CsFirmware.v1.0.zip
See the changelog for this script for a list of what’s changed in each version