Tuesday 3 December 2013

Lync Polycom VVX Manager Tool

UPDATE: There is now a new 2.0 version of the Polycom VVX Manager Tool available. See the blog post here for more details.

I’ve recently been doing a lot of work with deployment and management of Polycom VVX phones on Lync. Like always, I’ve found that when rolling out hundreds of any device, there are certain challenges that arise. One of the main challenges is: how do you centrally administer hundreds of devices that are distributed around a large geography, remotely? The short answer to this usually turns out to be: with great difficulty!

One of the first rules of a good centralised management solution is how much information you can get out of a system without having to ask the end user over the phone to tell you something about what they are seeing. A simple example of this might be with a VVX phone, when you get a report from a user that their phone is “broken”. In most cases this is about the level of detail you can expect from an end user, because to them the fact that the system voice policy is blocking them from dialling out is the same as their phone having caught fire and exploding while they were out at lunch… The fact is, they can’t make a call, so the phone is “broken”. As IT professionals though, we know there are a great many nuances as to why the phone may not be working for the end user. So we start stepping through the troubleshooting process… Is the phone plugged in? Is the phone configuration FTP server available? Did it receive the adequate information from DHCP to prompt for PIN sign in? Does the user even have a PIN assigned for them to actually sign in? Is the phone registered with the system? Does the user have the rights to dial the number they were dialling? etc…

So you probably get the picture. There’s a tonne of questions that need to be answered, and the last thing you want to do to answer them is ring the user on their mobile (because their desk phone is "broken") and ask them if they see a little green tick or a little red cross next to the phone icon on the upper left hand side of the screen… followed by a thousand other questions about the smouldering piece of burnt up plastic on their desk.  

So I figured I would try and put together a tool that might make answering these questions a little bit easier:

Lync Polycom VVX Manager




Last Updated ( 1/7/2014 )

1.01 Enhancements:
  • In the 1.00 release there can be cases where there is a VVX registered to the system but the tool reports them as having NO VVX in the ListView. This issue is a caused by the database entry for SipCallId containing junk information instead of the devices IP address. The processing has been changed in 1.01 so now when a VVX is registered it will always show up as YES in the listView. If there was no IP address in the database for the device then the IP will show as "IP NOT IN LYNC DATABASE" within the tool. A work around for this is to manually reboot the VVX, when it re-registers to the system the database field usually gets updated to contain the IP address again.
  • Text layout within the information text box has been changed to make it easier to read.
  • Added port variable for connecting to VVX via web browser when non standard port is used in the VVX configuration. Edit the $script:WebPort = "80" to whatever port your VVXs are using.
1.02 Enhancements:
  • Support added for secondary device discovery method. In previous versions the phone manager would discover the IP address of VVX phones from the Lync Server database. However, sometimes the Lync database did not have the data in it for every registered phone. So in version 1.02 a secondary "IP Range discovery" method has been added to discover phones on LAN segments. Simply type an IP Range (format: "192.168.0.1-192.168.0.20" OR "192.168.0.0/24" OR add multiple with comma separation "192.168.0.0/24,192.168.1.0/24") into the listbox and press the "Discover from IP Range" button. The tool will then "ping" the phones to see if they are at each IP in the range. This method is slower than the Lync database discovery (it can scan a 254 host range in ~60 seconds or less. Note: scanning directly connected subnets is slow because of ARP wait time), so you should only use it if you reciving "IP NOT IN LYNC DATABASE" for the IP Address of users with the default Lync Database discovery method.
  •  Added a new variable for https connections to the VVX web interface (as this will be the default in VVX 5.1 for the web interface when enabled). Change the variable $script:useHTTPS to be $true if you would like all web interface connections to use https instead of http. This will also require that you change the $script:WebPort variable to be "443" as well (or whatever port you set in the configuration file for https).
  • Export VVX phone deployment information. This outputs a CSV file that contains all the Users, IPs, Firmware Version, Serial Numbers, Lync Server, and MAC Address (if available) for all logged in phones. If you select the "More" checkbox you will also get the additional Lync settings for the phone (this is slower).
1.03 Enhancements:
  • Added the ability to send text messages to Polycom VVX phones. An example of this would be to send a message to warn before a system upgrade or a reboot. Messages are displayed on the screen for 30 seconds.

Version 1.03 Text Messaging Settings:

The Polycom VVX phones require special settings in order to receive messages from the Lync Polycom VVX Manager tool. The settings below will need to be added to your configuration files:

<apps.push apps.push.alertSound="1" apps.push.messageType="5" apps.push.serverRootURL="push" apps.push.password="vvxmanager" apps.push.username="vvxmanager"></apps.push>
  • apps.push.messageType: This sets the level of messages that will be displayed for the phone. The VVX Manager always sets the messages as “critical” so they will always be received. The setting “5” means that all levels of messages will be displayed by the phone.
  • apps.push.serverRootURL: This setting needs to be set to "push". This is used as part of the URI for sending messages to the VVX.
  • apps.push.username: The phones use digest authentication for push connections. The username sent by the tool by default is “vvxmanager”.
  • apps.push.password: The phones use digest authentication for push connections. The password sent by the tool by default is “vvxmanager”.
  • apps.push.alertSound: Play a sound when the message is displayed. This is the standard Polycom sound that you heard when a phone reboots. This can help the user to see the message, as it will only be displayed for 30 seconds.

Within the Powershell script you can change the Username and Password used for authentication to something else if you desire. Settings are here:

#Edit these settings if you would like to you customer username and password for messaging.
$script:pushUsername = "vvxmanager"
$script:pushPassword = "vvxmanager"

Example Message:
System Outage

1.04 Enhancements:
  • Had a report of some issues with case sensitivity with SIP URI's. Removed case sensitivity to correct the issue. (Thanks to Benoit Machiavello for reporting this issue)
  • (Request) Added ability to filter users list to only show users with VVX phones.

1.05 Enhancements:
  • Added the ability to import previously exported CSV files containing user/device information. This can save time scanning IP ranges for devices by only checking (ie. pinging each device to check who is logged in) the IP addresses from the CSV file. If you have a "known good" export (eg. an export that you may have been taken minutes earlier) you can directly import the settings without rescanning each device for changes. Importing without rescan can be a little risky if you're working with an older export, due to IP addresses and user logins of each VVX's possibly changing over time. So it is recommended that you use the rescan option to refresh all the user data within the VVX Phone Manager Tool's database.
  • If a VVX handset that is signed out is discovered, it will be added to the user list under the name “VVXNot@LoggedIn_<index number>”. This allows you to use the tool to access these devices even though they are not logged into Lync. This method only works with the IP Scanning method of discovery, it does not work when discovering from the Lync database.
  • Corrected an issue with the display of users that are logged into multiple phones. The tool will display multiple entries in the user list when user are logged into more than one phone.
  • The tool in previous versions would automatically load the user list and try to discover user information from the Lync database. This could waste time when first opening the tool for users that only wanted to use the IP Discovery method. To save time in these circumstances, from version 1.05, the tool will not automatically try to connect to the Lync server database when first opens. On first boot you can update the user list by clicking the "Discover From Lync Database" or enter an IP range and click the "Discover From IP Range(s)" button.
  • Added information in this post about using the VVX Phone Manager Tool with Version 5.1 VVX firmware. Read this section before updating your production firmware!

Download Version 1.05 here:




IMPORTANT UPDATE: Polycom VVX 5.1 Software Update Changes

Read this section before updating your production firmware!

Version 5.1 of Polycom VVX firmware has some increased security enhancements. This will affect your ability to connect to the web interface of VVX devices when you are running them in an out-of-the-box configuration. However, you can still have access to the web interface of the VVX phones by editing some configuration settings on the devices (usually done via a configuration FTP server).

The following web server settings have been enhanced in version 5.1 VVX firmware:

Web Config Mode
httpd.cfg.enabled
httpd.cfg.secureTunnelEnabled
httpd.cfg.secureTunnelRequired
Disabled
0
0
0
HTTP Only
1
0
0
HTTPS Only
1
1
1
HTTP/HTTPS
1
1
0

Example settings:

HTTP Web access only:
<!-- HTTP Admin Settings -->
<httpd httpd.enabled="1" httpd.cfg.enabled="1" httpd.cfg.port="80" httpd.cfg.secureTunnelEnabled="0" />

HTTPS Web access only:
<!-- HTTPS Admin Settings -->
<httpd httpd.enabled="1" httpd.cfg.enabled="1" httpd.cfg.secureTunnelPort="443" httpd.cfg.secureTunnelEnabled="1" httpd.cfg.secureTunnelRequired="1" />

Both HTTP and HTTPS web access: 
<!—HTTP and HTTPS Admin Settings -->
<httpd httpd.enabled="1" httpd.cfg.enabled="1" httpd.cfg.port="80" httpd.cfg.secureTunnelEnabled="1" httpd.cfg.secureTunnelPort="443" httpd.cfg.secureTunnelRequired="0" />

Note: If you would like to make the Web Admin harder for people to find you can change the port number to something different from the default 80 or 443 settings. Then in the VVX Phone manager you can change the $script:WebPort variable to whatever value you have chosen. If you want to use HTTPS from the tool, set the $script:useHTTPS setting to $true.

In addition to this you need to change the default password on the devices as to avoid errors/warnings popping up on the phone display and web interface (“Default admin password is in use, please contact your administrator”). These can be set here:

<!-- Passwords and Security -->
<device device.auth.localAdminPassword="12345" device.auth.localUserPassword="12345" />

Note: Make these passwords whatever you want them to be, however, they must be different than the default of 456 in order to avoid the warning message being displayed on the phone screen.

After you have changed these settings the web login and phone screen login passwords will be changed. So if your support staff have been trained to enter the default “456” password, don’t forget to tell them that it’s changed.


Features of Lync VVX Phone Manager


1. Find out information about VVX handsets connected to a Lync system (IP Address, the Lync server that the handset is registered to, user policies, PIN status).

2. Remotely reboot VVX handsets using the ‘Reboot’ button. Reboot a selection of handsets by selecting (hold shift/ctrl) multiple users in the list, then press the ‘Reboot’ button. Or reboot all the VVX handsets on a Lync system with the “Reboot All” button.

3.Set the PIN for a user - either a random PIN (if the PIN field is left blank), or specify a PIN number by filling in the field. This can also be done on multiple selected users.

4. Lock and unlock the PIN for a selected user with the ‘Lock PIN’ and ‘Unlock PIN’ buttons. This can also be done on multiple selected users.

5. Test your FTP Configuration server by simply entering the IP address of the FTP server and pressing the “Test FTP” button. The tool will attempt to connect to the FTP server and download information about key files associated with a Polycom configuration server deployment. These include the base configuration file (000000000000.cfg), configuration files in the CONFIG_FILES tag, any MAC address files associated directly with phones, and firmware files (*.sip.ld). The tool will give feedback as to the state of the FTP server.


6. Test PIN and device bootstrapping by entering a PIN number for the selected user and pressing the "Test PIN" button. The tool uses the Test-Bootstrap command in the background to imitate the process of a Lync Optimised Phone connecting to the system. Part of this process is that the Lync server generates a DHCP Inform request from the Lync server and sends it out to discover the Vendor Class Options (Option 43), and SIP server Option (Option 120) which it will then use the results of to generate a PIN authentication with the system. Below is an example of the DHCP message that the server sends out for this test:




This is awesome, but in some ways not a perfect test. It will depend on how you have set up your DHCP architecture throughout your sites as to the result of this process. You may either be using your Lync Server’s inbuilt DHCP server to respond to these INFORM messages, or you might be using a real DHCP server on your phone subnet to respond to these messages.

If you always receive the error “Did not receive any response for the DHCP discovery message.” when testing the PIN number, then it’s likely that there’s no DHCP server capable of responding to INFORM messages in the subnet that your Lync server is on. To get around this you can enable a special DCHP INFORM message responder in the Lync server.

The Lync Server DHCP server configuration lives under the registrar configuration. You can see the setting in Powershell by running this command:

PS > Get-CsRegistrarConfiguration

Identity                        : Global
MinEndpointExpiration           : 300
MaxEndpointExpiration           : 900
DefaultEndpointExpiration       : 600
MaxEndpointsPerUser             : 8
EnableDHCPServer                : True
PoolState                       : Active
BackupStoreUnavailableThreshold : 00:30:00
MaxUserCount                    : 7500
Note: This setting only answers DHCP inform requests with Vendor Class “MS-UC-Client”, and not basic Discover messages used for IP address configuration.

If this setting is set to True, the Lync server will respond to INFORM requests it sees broadcast on the subnet. So if you don’t have a DHCP server on you Lync server subnet (which you may not if your servers are deployed in a data centre) you may have to substitute for this by turning on the DHCP server in the Lync server.

If you do choose to implement this work-around, be sure to understand that the environment the Lync server is in may not be the same as the one the phone is deployed in. You will need to ensure that the phone is getting the correct information for its DHCP INFORM requests as well. So be sure to check your DHCP configuration for the subnets that the phones are deployed on (ie. 001 – UCIdentifier, 002 – URLSchme, 003 - WeServerFqdn, 004 - WebServerPort, 005 - CertProvRelPath, 120 - UCSipServer). If you want to know more about the DHCP options required for Lync phones, have a read of the in-depth Understanding DHCP Option 43 article by Jeff Schertz.


7. Easily connect to the VVX web interface of any user on the system by clicking the “Web Config” Button.

 The Polycom VVX has a web interface which can be quite useful for troubleshooting issues with Lync. It includes a page dedicated to Lync specific settings (Diagnostics->Lync Status), that gives lots of good information:


As you can see in the picture above, there is some very useful information held in the Lync Status page.  So if you’re having some issues with a phone, just find the user in the Lync Polycom VVX Manager Tool and click the “Web Config” button. This will connect you directly to the user’s VVX web interface. You can also configure logging on the phone from the web configuration page, and view/download the logs directly from the browser as well.

Note: When Polycom phones are put into Lync mode, not all of the features in the web interface are relevant. This is because the web interface still has all the Standard SIP mode features (used for other platforms) still in it. So be careful not to assume that changing random settings will have the desired effect.


Prerequisites to use VVX Manager


In order for the “Reboot” and “Reboot All” buttons to actually reboot your phones, you will need to configure a special setting within the configuration files used by your phones. The reboot buttons in the tool use a specially crafted SIP NOTIFY message that tells the phone to re-download its configuration files from the configuration FTP server. This updates most settings in the phone, but not always all of them. To force the phone to do a full reboot, which ensures that all settings are applied you need to add the following settings in your phones configuration files:

<voIpProt voIpProt.SIP.specialEvent.checkSync.alwaysReboot="1" />

Note: If you already have phones deployed, you can add the setting to the configuration file, and press the reboot button on the tool once to make the phones re-download their files (which will also update this setting). From then on you will be able to do full reboots of the phone from the tool.

Another suggestion that may be of use: if you want to be able to remotely tell what the MAC address is of a phone (useful when building phone specific config files) from the VVX Phone Manager tool interface without having to open the web config, add the following setting:

<device sec.tagSerialNo="1">
   <prov device.prov.tagSerialNo="1"/>
</device>

This will result in the MAC address being included in the device string, eg: “VVX Version: PolycomVVX-VVX_500-UA/5.0.0.6874_0004f28038f9”. If you do this, the tool will also check the FTP server for individual MAC address files and tell you which phones have these when the “Test FTP” button is pressed.

Note: See 1.03 release information for Text Messaging requirements.

Allow Call Park Manager to Connect to Remote Pools


In order for the Lync VVX Phone Manager to learn about the phones connected to your deployment, it needs access to your RTCLOCAL databases for each Front End server pool. If you only have one Standard Edition server, then you can run the tool directly on this server and it will be able to access the RTCLOCAL database directly. However, if you have multiple pools, the VVX Phone Manager will try and connect to each pool to download all the registered endpoint data for each pool.




In order for the SQL connection to be made, inbound connections to the SQL Browser Service and RTCLOCAL database will need to be allowed through the Windows firewall. These rules are not created automatically during Lync Server Setup like most of the other rules are. So to open the ports, download the script below and run it on all of your front end servers (including SBA and SBS servers).

Run the script included in the VVX Manager Tool zip file (OpenSQLPortsForVVXManager1.00.ps1) on the server you want to open the SQL Browser and RTCLOCAL Dynamic TCP SQL ports on (ie. all Front End servers and SBAs/SBSs). If you would like to know more about how to manually do this configuration, there’s more information on my Call Pickup Group Manager Tool post.

Note: This is the same process as is used for the Lync 2013 Call Pickup Group Manager tool. So if you have already opened the ports to run that tool, you don’t have to do it again.


Getting Started with a Polycom VVX Deployment


This article was written under the assumption that you already have VVX phones deployed, and you are now looking to manage them. If you need some more help with the initial deployment part of the process, I can point you to some useful resources:

Jeff Schertz' post on the different ways to deploy Polycom phones here in his article entitled Provisioning Polycom SIP Phones. Greig Sheridan also has a nice post on Optimising the Polycom VVX for Lync that you might want to check out.

If you would like to know more about what is supported on Lync with VVX phones and setting up a FTP server to support Polycom Configuration files on Lync, go to the Polycom VVX support page and grab a copy of the lovingly entitled: “Deploying Polycom® UC Software for use with Microsoft® Lync™ Server”.

An important recommendation that I can give you is to always test your configuration files on a real phone before deploying them into the wild, because very subtle errors can cause things not to work as desired.

The Wrap Up


As always, feel free to give feedback regarding bugs and issues you find with the tool, I will endeavour to fix any issues that I can reproduce. Other than that, I hope that you get many hours of enjoyment out of this new tool, and that it saves you many additional hours in the process. As Humphrey Bogart says at the end of Casablanca “Louis, I think this is the beginning of a beautiful friendship.” Fade to black. Roll credits.


Read more →

Sunday 13 October 2013

Lync 2013 / Skype for Business Call Pickup Group Manager Version 2

In Lync 2013 Cumulative Update 1 (February Update) Microsoft added the new call pickup group feature. Call pickup has been a classic voice feature since the very early days of PBXs. As a result, lots of businesses are still used to being able to answer other people’s calls by dialling special access codes from their phone. So it’s great that Lync finally has this capability to help ease some of the pain points for businesses transitioning from their previous traditional PBX systems to the new world.

Group Call Pickup Operation:

  • Calls coming in to any member of a call pickup group can be answered by dialling a special access code for that group. Note: the person wanting to answer the call will physically need to hear the other person’s phone ringing.
  • Any other user on the system can answer a call to a call pickup group by dialling the call pickup access code associated with that group. This feature does not restrict the call to only be answered by people in the group.
  • If there are multiple calls ringing on phones in the same group, the first call into the group is the call that will be answered when the access code is dialled. The other calls in the group will be queued in the order the calls came into the group after that.
  • Only direct calls to a user’s phone number can be answered with call pickup. (see limitations below for more details)


Call Pickup Groups in Lync 2013 have the following limitations:

  • Users can be assigned to only one call pickup group at a time.
  • Call pickup service uses the call park services running on the Lync front end server. When a call rings on a call pickup group user’s number it will simultaneously be automatically parked on the call park service. If the user picks up the phone the parked call is removed, or if the call pickup number used to answer the call, the user’s phone will stop ringing.
  • Calls into a call pickup group can be answered by any phone within the organisation, as long as the user wanting to pick up the call knows the correct access code to dial for that group.
  • Response group calls ringing on a call pickup group user’s phone cannot be answered via call pickup.
  • Delegate Calls – Calls delegated to another phone cannot be answered with call pickup.
  • Team Calls – Calls to users with team calling configured cannot be answered using a call pickup access code.
  • Simultaneous Ring Calls cannot be picked up with group call pickup.


Unfortunately, configuring call pickup groups has not been very easy to do (till now), due to Microsoft only giving access to configure call pickup groups through the very archaic SEFAUtil from the Lync Resource Kit (ResKit). This tool was originally designed to be used for administratively configuring Call Forwards and Team Calling by running commands from the prompt. SEFAUtil can check which call pickup group a user is in, or set which group a user in, via the command line.

A big problem with SEFAUtil (and also the Powershell commands in Skype for Business) is that it usually takes 2-5 seconds to check the settings for each user, and another 2-5 seconds to change their setting via the command line. In addition to this, you can’t directly query a call pickup group number to see which users are in that particular group. Instead, you have to query each user individually to establish the call pickup groups of which they are a member. If you think about that, for 1000 users it could take you (1000 x 5 seconds) well over an hour just to discover which groups all the users are in. This seems a little excessive to me.   

It’s time for a better way…


Lync 2013 Call Pickup Group Manager


So after many evenings in the lab scripting away, I have created a tool that will hopefully make life (when it comes to call pickup groups, at least), a bit easier. So what does it look like?



Features of Lync 2013 / Skype for Business Call Pickup Manager:
  • Works with both Lync 2013 using SEFAUtil or with Skype for Business CU1+ using Powershell commands.
  • View all call pickup group configuration (Orbits, Groups and Users) in one simple interface.
  • Call Pickup Group Manager discovers call pickup configuration information directly from the Lync / Skype for Business database. This avoids having to poll every user individually using SEFAUtil or Powershell to find their settings. This makes configuration discovery much faster than SEFAUtil or Powershell can offer in Lync 2013 or Skype for Business.
  • Easily Add, Edit or Delete Call Pickup Orbits.
  • Group-centric configuration of groups. ie. You can look up groups and see which users are in them rather than looking up each user individually to find their group assignment.
  • Multi-selectable user list boxes for adding or removing multiple users at once.
  • Use the "Find Selected User" button to find which group a user is assigned in.
  • Use the Filter button to reduce the user list to quickly find the user you want to add.

Updates

1.01 Update:
  • Pre-Req check will now look under the default reskit location on all available drives (not just C:)
  • If SEFAUTIL gives no response (due to an unknown error in SEFAUTIL) the tool will display an error to the user.
  • Added the Import-Module Lync command in case you run the script from regular Powershell or use the Right Click Run using Powershell method to start the script.
1.02 Update:

1.03 Common Area Phone Update:
  • This version has been updated to handle Common Area Phones. Some people reported errors being displayed by the tool when they had manually set (with SEFAUTIL) Group Call Pickup against Common Area Phones (ie. against the SIP URI of the Common Area Device, eg: sip:fbcb642b-f5bc-477a-a053-373aef4c00f8@domain.com). As of this version Common Area Phones will be included in the user list, and you can add and remove them from Call Pickup Groups.
  • User listboxes are now slightly wider to deal with the long SIP addresses of Common Area Phones.
  • When the tool loads it will display in the Powershell window the SIP Address and Display Name of all common area devices so you can match the (GUID looking) SIP address in the tool to the display name of the device.

1.04 Scalability Update:
  • Now supports window resizing.
  • Added Filter on Lync users listbox to cater for deployments that have lots of users.
  • Script is now signed.
1.05 Skype for Business Update:
  • Now checks that Group number matches a range that exists in one of the Call Pickup Orbits before allowing it to be added to the group list.
  • Up and Down keys in Orbit listbox now update orbit details properly.
  • You can now specify an alternate location of SEFAUTIL.exe in the command line. (Example: .\Lync2013CallPickupManager.1.05 "D:\folder\SEFAUTIL.exe")
  • Now checks the Skype for Business RESKIT location.
  • Put a dividing line between the Orbit creation section and the Group configuration section to try and indicate a divide between the two areas.
  • The Group list box label now displays the group name being listed up so the user understands better what group the user list is associated with.
2.00 Major Updates (11/4/2016):
  • When using Skype for Business the new Call Pickup Group Powershell commands (Available in Skype for Business CU1+) for user settings are detected and used instead of SEFAUTIL. This means you don't have to worry about any SEFAUTIL configuration anymore in Skype for Business CU1 or higher!
  • Unfortunately the Skype for Business Powershell commands have proved to be too slow for the discovery of all users Call Pickup Settings (because "Get-CsUser | Get-CsGroupPickupUserOrbit" has to iterate through all users taking about 2 seconds per user and takes ages). So I have retained and improved the direct SQL discovery method from version 1.0 for both Lync 2013 and Skype for Business.
  • Changed the way the Groups list box works. It now will be automatically filled with all the available groups from the Orbit ranges assigned in the system. If there is a user in a Group then it will be highlighted in Green text with Yellow background to help you find users without looking in empty groups.
  • When Orbits are added all the available groups will automatically be added to the available Groups list. Note: when you remove ranges that contain groups with users in them the group will no longer be accessible in the interface, however, the Pickup Group will still function. So make sure you remove users from groups before you delete the Orbit range.
  • Added a refresh button so the data can now be updated from the system whenever you want.
  • Improved the speed of looking through groups by re-architecting some of the code.
  • After a user is added or removed from a group the tool does not rescan all user's data again. Whilst this method always ensures the data being displayed is up to date, it's also much slower. This version is optimised for speed :)
  • Added pretty looking UP and DOWN arrow icons on add and remove buttons to try and clarify operation.
  • Added the "Find Selected User" button to find which group a user is assigned to.
  • Added help tool tips on buttons.
2.01 Enhancements
  • Added an export to CSV data to the app.
  • Fixed an issue with highlighting groups with users in them.
2.02 Update

  • Now supports Skype for Business 2019.



Available on the TechNet Gallery:

DOWNLOAD HERE



Prerequisites to use Call Pickup Group Manager


There are some important prerequisites that you need to use on both Lync 2013 and Skype for Business for the Call Pickup Group Manager to work properly.

Lync 2013 Prerequisites: 

  • Requires SEFAUtil installed on the system to Add, Remove, and Edit Call Pickup Settings.
  • Requires SQL Dynamic Ports opened in Windows Firewall on all Front End servers.

Skype for Business (CU1+)  Prerequisites

  • Skype for Business (CU1+) uses inbuilt Powershell commands to Add, Remove, and Edit Call Pickup settings (this is baked into the CU1 and above. So no additional installation is required.)
  • Requires SQL Dynamic Ports opened in Windows Firewall on all Front End servers.

Lync 2013 SEFAUtil Prerequisite

Under the hood, the Call Pickup Manager on Lync 2013 will use the SEFAUtil for adding and removing users from groups. This was a deliberate choice, as I wanted the tool to be supportable by Microsoft (ie. by avoiding any direct database editing, or hacking of things), and you don’t have to fear any unnecessary database corruption from using the tool.

Resource Kit Download

Download and install a copy of the Lync 2013 ResKit from here:

Make sure you have the ResKit installed on the Front End server you are running the Call Pickup Manger Tool on. I have written prerequisite checks into the tool, so you will get an error in the console window if it's missing.

SEFAUtil Configuration

Once the resource kit has been installed you need to configure Lync so it will trust the SEFAUtil tool. This allows the SEFAUtil to make UCMA calls to the Lync system.

Adding SEFAUtil as a trusted application:

Create a variable containing the site you will be configure SEFAUtil for:

$Site = Get-CsSite –Identity Melbourne

Configure the Trusted Application Pool:

New-CsTrustedApplicationPool –id pool.domain.com –Registrar pool.domain.com -site $Site.SiteId

Configure the Trusted Application:

New-CsTrustedApplication –ApplicationId sefautil –TrustedApplicationPoolFqdn pool.domain.com –Port 7489

Enable the Topology for the pool to start using the Trusted Application:

Enable-CsTopology

Here's the Technet explanation if you need it: http://technet.microsoft.com/en-us/library/jj945659.aspx



SQL Firewall Settings - Required for Lync 2013 and Skype for Business 


In order for the Call Pickup Manager to quickly download call pickup settings from your deployment, it needs access to your RTCLOCAL databases for each Front End pool. If you only have one Standard Edition server, then you can run the tool directly on this server and it will be able to access the RTCLOCAL database directly (note: this is also the case for an enterprise edition pool, but you need to run the tool on the first server in the Get-CsPool -> Computers property array, because this will be the database the tool tries to connect to). If you have multiple pools, the Call Pickup Manager will try and connect to each pool to download all the call pickup data for each pool (Branch SBA's also count as a separate pool).


In order for the SQL connection to be made (as shown in the diagram above), inbound connections to the SQL Browser Service and RTCLOCAL database will need to be allowed through the Windows firewall. These rules are not created automatically during Lync Server 2013 and Skype for Business Setup like most of the other rules are. So you will need to do this manually, by following the process below:

The Manual Method for Opening Firewall


You can add Firewall rules either through the Windows Firewall settings in Control Panel, or by the command line. In this example I will show you how to add the ports using the command line.

Step 1: Add the SQL Named Instance Browser with the following command:

netsh advfirewall firewall add rule name="Lync 2013 Call Pickup Manager - SQL Browser (UDP 1434)" dir=in action=allow protocol=UDP localport=1434 profile=domain

Step 2: Find the Dynamic TCP port used by the Named Instance (RTCLOCAL). Firstly, open the SQL Server Configuration Manager (On a Standard Edition server, this is installed when the local databases are deployed).

  1. Open SQL Server Configuration Manager
  2. (Select) Protocols for RTCLOCAL
  3. (Right Click) TCP/IP -> Select Properties
  4. (Select) IP Address Tab -> IPAll -> TCP Dynamic Ports

As you can see in the example below, for IPAll the TCP Dynamic Port is 49264. This is the Dynamic Port for this Named Instance that needs to be opened in the firewall.



Step 3: Add the Named Instances Dynamic Port via the following command (Substitute the Dynamic Port for your deployment in the highlighted area below):

netsh advfirewall firewall add rule name="Lync 2013 Call Pickup Manager - SQL RTCLOCAL Dynamic Port (TCP-in)" dir=in action=allow protocol=TCP localport=<Insertporthere> profile=domain


The Automated Method for Opening Firewall

If you are not fond of doing manual processes, you could just use the script below for opening the ports automatically on your remote Front End servers:


Download Open SQL Ports For Call Pickup Manager 1.00 Script here (also supplied in the tool zip):



Run this script on the server you want to open the SQL Browser and RTCLOCAL Dynamic TCP SQL ports on.

The Wrap Up


Once again, we’ve come to the end of another show. I hope you like my new tool and it makes your life a little easier. If you find any bugs or have any issues with it, please report them back to me so I can update the tool. Until next time, remember to answer your phone, and if you don’t, at least remember to get someone else to dial #110 to answer it for you. See ya next time!


Read more →

Saturday 8 June 2013

Installing Lync 2013 Cumulative Updates with Mirrored Databases (CU1)

Overview


Update (CU2): With the release of Lync 2013 CU2 (July 2013) the upgrade process has changed from what is documented here. The new process in CU2 does not include the requirement to break the database mirror anymore. You do need to still ensure that the database servers are running on the Primary side before applying the Install-CsDatabase commands though. Please refer to the updated KB article here. There is a nice flow chart detailing the update process for front end servers here too.

There are now additional steps involved when running cumulative updates on Lync 2013 pools that have mirrored SQL databases. So I thought I would go into some detail about this new process and show how my Database Manager Tool can be used as part of this procedure. This post specifically covers the process documented for Lync 2013 CU1 (Feb 2013), however, it's likely the process will be similar for future cumulative updates. So this post should continue to function as a reference in the future, but be sure to always check the process documented for the specific CU you are installing before doing an upgrade.

The high level steps for this process are:
  1. Download and install the updates all of the Lync Servers.
  2. Run the Update Installer on all Lync Servers.
  3. Check that all of the databases are running on the Primary SQL server.
  4. Uninstall (remove) the database mirror for the Application database type.
  5. Install the schema updates on the Primary database.
  6. Recreate the database mirror for the Application Database type. This will recreate the Application databases back on the mirror server.
  7. Check the status of the database to see that they are all running correctly.
  8. (Optional) If your Monitoring backend databases are on a different server, update them now.
  9. Update the Central Management Database schema. (only if the database is on Lync 2013. If the CMD is on a Lync 2010 pool then you don’t do this)
  10. Enable the Mobility Service.
  11. Enable the UCWA service.
Note: the official process is on Technet here, please read it: http://support.microsoft.com/kb/2809243

The Process


Step 1: Download Update

The first step in upgrading Lync is downloading the CU1 Update installer from the Microsoft site: http://www.microsoft.com/en-us/download/details.aspx?id=36820

Step 2: Run the update on all Lync Servers

Run the CU1 Update Installer executable on all of your Lync Servers (one at a time, as the tool will take the services offline when updating them). The Updater will show you that all of your Lync services need updating:


This will take the services offline and upgrade them. After they are upgraded the Update Installer will show them as being the latest version with a green tick:


If you run your Lync Servers in this state (ie. Without updating the database schema) you might notice some strange errors being logged in the Event Viewer, for example:



The above error states that “There was a problem communicating with the Group Pickup backend database” (Event ID 31055). This is because the CU1 release has added the new Group Pickup feature, which requires new schema additions in the Lync SQL databases for storing the data for this feature.

Step 3: Check the current state of the SQL databases

When you’re not using mirrored databases this process is relatively simple, and can be achieved running one or two commands. However, when you’re using database mirroring there is a requirement to remove the mirror for specific databases that need to have the schema updated, and then re-create the mirror databases after the update has been applied to the primary database.

To remove the database mirror you will first need to ensure that all of your databases are running on the Primary SQL server. Using the database Lync 2013 Mirror Manager Tool you can do this as shown:


Note: The Lync 2013 Mirror Manager can be downloaded from here

If you have databases that are showing up in the Secondary column of the tool, then it means that they are running on the secondary SQL server and need to be moved back onto the primary SQL server (if you're running a witness server these database may have changed over to the secondary server without your knowledge). Move the databases back onto the primary simply by ticking all the check boxes in the Primary column and then click the Invoke button. You will then be prompted in the Powershell window about changing the databases back to the Primary server. Type “y” as a response to these questions. After this is complete the tool will update and the databases should all appear in the Primary column.

Note: In the above example I haven’t checked the status of the Persistent Chat Databases. In the real world you should actually do this at this point. However, for the purposes of this example I haven’t done this to show what effect it has later when running the Database Install commands.

Step 4: Remove the Database Mirror for the 'Application' database

We now need to remove the mirrored database configuration for the 'Application' database type.

Note: In the future the need to remove the database mirror for other database types may become a requirement as well. So if you are coming to this post for a newer CU update, please refer to the specifics of the KB article relating to your specific CU release.

Run the following command:

Uninstall-CsMirrorDatabase -DatabaseType Application -SqlServerFQDN DOMAINSQL001.domain.com -SqlInstanceName Lync2013 -DropExistingDatabasesOnMirror -Verbose

Here is an example of the command running:

PS > Uninstall-CsMirrorDatabase -DatabaseType Application -SqlServerFQDN DOMAINSQL001.domain.com -SqlInstanceName Lync2013 -DropExistingDatabasesOnMirror -Verbose
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Uninstall-CsMirrorDatabase-ca7fc931-e778-40f4-bc17-9c7d51040855.xml".

Uninstall Mirrors
Uninstall mirrors required by Lync Server role(s). Note that the cmdlet will try its best to drop the databases on the mirror server, but
this is not guaranteed. After the cmdlet is finished, manually verify that the databases are dropped. If the databases are not dropped, drop
 the databases manually. Are you sure you want to proceed?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
VERBOSE: No changes were made to the Central Management Store.
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Uninstall-CsMirrorDatabase-ca7fc931-e778-40f4-bc17-9c7d51040855.html".
WARNING: Uninstall-CsMirrorDatabase failed.
WARNING: Detailed results can be found at
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Uninstall-CsMirrorDatabase-ca7fc931-e778-40f4-bc17-9c7d51040855.html".

On the Primary SQL Server:



As can be seen above, the cpsdyn, rgsconfig, and rgsdyn databases (which make up the Application database type) have now had their mirror configuration removed (ie. There is no “Principal, Synchronized” state written next to them now).

An important part of the command that we just ran was the “-DropExistingDatabasesOnMirror” switch, which tells Lync to delete these databases from the mirror server. Unfortunately, this function doesn't seem to always work, and databases can be left on the mirror server. So now we need to check the SQL instance on the Mirror server to see if these were deleted.

On the Mirror SQL Server:



From the screenshot above we can see that on the secondary server, the rgsconfig database has been automatically deleted. The cpsdyn and rgsdyn databases, however, are still there but stuck in “Restoring…” state. These databases will get re-created later when the Mirror is reconfigured between the two SQL servers, so it’s safe to manually delete these databases:



Step 5: Install the new schema updates on the Primary Database

Run the following command to install the Schema updates:

Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn DOMAINSQL001.domain.com -Verbose

NOTE: The error below can be caused by not having enough free disk space on the SQL servers. This is most likely to happen in a lab environment where you’ve only provisioned the minimum disk space for each machine. I had this happen with 15.3GB of disk space free, however, when I expanded the disk to have 29GB free this error went away.

Install-CsDatabase : Command execution failed: Cannot find any suitable disks for database files. You must manually specify database paths.
At line:1 char:1
+ Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn DOMAINSQL001.mylynclab.c ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Install-CsDatabase], DeploymentException
    + FullyQualifiedErrorId : ProcessingFailed,Microsoft.Rtc.Management.Deployment.InstallDatabaseCmdlet

The execution of this command will look like this:

PS C:\Users\Administrator.DOMAIN> Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn DOMAINSQL001.domain.com -Verbose
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsDatabase-817afad5-d1d5-42dc-a4cf-70589c7bdd09.xml".
VERBOSE: Install databases required by Lync Server role(s).
VERBOSE: Skipping Central Management Database "1-CentralMgmtStore-1". Central Management Databases are installed using the
-CentralManagementDatabase parameter.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.BlobStore'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rtcxds.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.RtcSharedDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rtcshared.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.AbsDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rtcab.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.RgsConfigDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rgsconfig.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.RgsDynDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rgsdyn.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.CpsDynDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database cpsdyn.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.ArchivingDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database LcsLog.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.MonitoringDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database LcsCDR.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.QoEMetricsDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database QoEMetrics.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.MgcDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database mgc.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.MgcCompDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database mgccomp.
VERBOSE: Assigning "BackendStore:BlobStore:LogPath" to C:\CsData
VERBOSE: Assigning "BackendStore:RtcSharedDatabase:LogPath" to C:\CsData
VERBOSE: Assigning "ArchivingStore:ArchivingDatabase:LogPath" to C:\CsData
VERBOSE: Assigning "MonitoringStore:MonitoringDatabase:LogPath" to C:\CsData
VERBOSE: Assigning "MonitoringStore:QoEMetricsDatabase:LogPath" to C:\CsData
VERBOSE: Assigning "ArchivingStore:ArchivingDatabase:DbPath" to C:\CsData
VERBOSE: Assigning "MonitoringStore:MonitoringDatabase:DbPath" to C:\CsData
VERBOSE: Assigning "MonitoringStore:QoEMetricsDatabase:DbPath" to C:\CsData
VERBOSE: Assigning "ABSStore:AbsDatabase:LogPath" to C:\CsData
VERBOSE: Assigning "ApplicationStore:RgsConfigDatabase:LogPath" to C:\CsData
VERBOSE: Assigning "ApplicationStore:RgsDynDatabase:LogPath" to C:\CsData
VERBOSE: Assigning "ApplicationStore:CpsDynDatabase:LogPath" to C:\CsData
VERBOSE: Assigning "PersistentChatStore:MgcDatabase:LogPath" to C:\CsData
VERBOSE: Assigning "PersistentChatComplianceStore:MgcCompDatabase:LogPath" to C:\CsData
VERBOSE: Assigning "BackendStore:BlobStore:DbPath" to C:\CsData
VERBOSE: Assigning "BackendStore:RtcSharedDatabase:DbPath" to C:\CsData
VERBOSE: Assigning "ABSStore:AbsDatabase:DbPath" to C:\CsData
VERBOSE: Assigning "ApplicationStore:RgsConfigDatabase:DbPath" to C:\CsData
VERBOSE: Assigning "ApplicationStore:RgsDynDatabase:DbPath" to C:\CsData
VERBOSE: Assigning "ApplicationStore:CpsDynDatabase:DbPath" to C:\CsData
VERBOSE: Assigning "PersistentChatStore:MgcDatabase:DbPath" to C:\CsData
VERBOSE: Assigning "PersistentChatComplianceStore:MgcCompDatabase:DbPath" to C:\CsData
VERBOSE: Installing "BackendStore" on DOMAINSQL001.domain.com\Lync2013, collocated: False
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.BlobStore'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rtcxds.
Database created by script "BlobStore" already exists and is current.

****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.RtcSharedDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rtcshared.
Database created by script "RtcSharedDatabase" already exists and is current.

VERBOSE: Successfully installed the database. For details, see the following log:
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Create-BackendStore-DOMAINSQL001.domain.com_Lync2013-[2013_06_05][13_10_24].log"
VERBOSE: Installing "ABSStore" on DOMAINSQL001.domain.com\Lync2013, collocated: False
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.AbsDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rtcab.
Database created by script "AbsDatabase" already exists and is current.

VERBOSE: Successfully installed the database. For details, see the following log:
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Create-ABSStore-DOMAINSQL001.domain.com_Lync2013-[2013_06_05][13_10_24].log"
VERBOSE: Installing "ApplicationStore" on DOMAINSQL001.domain.com\Lync2013, collocated: False
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.RgsConfigDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rgsconfig.
Database created by script "RgsConfigDatabase" already exists and is current.

****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.RgsDynDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rgsdyn.
Database created by script "RgsDynDatabase" already exists and is current.

****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.CpsDynDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database cpsdyn.
Creating database cpsdyn from scratch. Data File Path = C:\CsData\ApplicationStore\Lync2013\DbPath, Log File Path= C:\CsData\ApplicationStore\Lync2013\LogPath.
Setting the database cpsdyn to single user mode.
Database cpsdyn set to mode Single.
Setting the database cpsdyn to restricted mode.
Database cpsdyn set to mode Restricted.
WARNING: Setting SQL Server Show Advanced Options to 1
WARNING: Setting SQL Server Recover Interval to 5 mins.
Executing CpsDyn.sql...
Setting owner for database cpsdyn to sa.
Creating login DOMAIN\RTCComponentUniversalServices.
Creating user DOMAIN\RTCComponentUniversalServices.
Creating Schema DOMAIN\RTCComponentUniversalServices.
Creating login DOMAIN\RTCUniversalReadOnlyAdmins.
Creating user DOMAIN\RTCUniversalReadOnlyAdmins.
Creating Schema DOMAIN\RTCUniversalReadOnlyAdmins.
Creating login DOMAIN\RTCUniversalServerAdmins.
Creating user DOMAIN\RTCUniversalServerAdmins.
Creating Schema DOMAIN\RTCUniversalServerAdmins.
Adding account DOMAIN\RTCComponentUniversalServices to role ReadWriteRole.
Adding account DOMAIN\RTCUniversalServerAdmins to role ReadWriteRole.
Adding account DOMAIN\RTCUniversalReadOnlyAdmins to role ReadOnlyRole.
Setting database version: Schema Version 1, Sproc Version 1, Update Version 2.
Setting the database cpsdyn to multi user mode.
Database cpsdyn is set to multi user mode.
VERBOSE: Successfully installed the database. For details, see the following log:
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Create-ApplicationStore-DOMAINSQL001.domain.com_Lync2013-[2013_06_05][13_10_25].log
"
VERBOSE: Installing "ArchivingStore" on DOMAINSQL001.domain.com\Lync2013, collocated: False
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.ArchivingDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database LcsLog.
Database created by script "ArchivingDatabase" already exists and is current.

VERBOSE: Successfully installed the database. For details, see the following log:
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Create-ArchivingStore-DOMAINSQL001.domain.com_Lync2013-[2013_06_05][13_10_34].log"
VERBOSE: Installing "MonitoringStore" on DOMAINSQL001.domain.com\Lync2013, collocated: False
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.MonitoringDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database LcsCDR.
Database created by script "MonitoringDatabase" already exists and is current.

****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.QoEMetricsDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database QoEMetrics.
Database created by script "QoEMetricsDatabase" already exists and is current.

VERBOSE: Successfully installed the database. For details, see the following log:
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Create-MonitoringStore-DOMAINSQL001.domain.com_Lync2013-[2013_06_05][13_10_34].log"
VERBOSE: Installing "PersistentChatStore" on DOMAINSQL001.domain.com\Lync2013, collocated: False
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.MgcDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database mgc.
Checking state for database mgc.
State of database mgc is DbState_NotAccessible.
Database 'mgc' exists but not accessible. It must be repaired manually or dropped and a new one created. if you want to preserve data, you must use this product's backup/e
. Examine the product documentation for instructions.
Install-CsDatabase : An error occurred while creating or updating the database for feature PersistentChatStore. For details, see the log file
'C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Create-PersistentChatStore-DOMAINSQL001.domain.com_Lync2013-[2013_06_05][13_10_34].log'
At line:1 char:1
+ Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn DOMAINSQL001.mylynclab.c ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:SourceCollection) [Install-CsDatabase], DbSetupDatabaseInUnusableStateException
    + FullyQualifiedErrorId : InstallDatabaseInternalFailure,Microsoft.Rtc.Management.Deployment.InstallDatabaseCmdlet
VERBOSE: Successfully installed the database. For details, see the following log:
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Create-PersistentChatStore-DOMAINSQL001.domain.com_Lync2013-[2013_06_05][13_10_34].
log"
VERBOSE: Installing "PersistentChatComplianceStore" on DOMAINSQL001.domain.com\Lync2013, collocated: False
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.MgcCompDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database mgccomp.
Checking state for database mgccomp.
State of database mgccomp is DbState_NotAccessible.
Database 'mgccomp' exists but not accessible. It must be repaired manually or dropped and a new one created. if you want to preserve data, you must use this product's back
tion. Examine the product documentation for instructions.
Install-CsDatabase : An error occurred while creating or updating the database for feature PersistentChatComplianceStore. For details, see the log file
'C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Create-PersistentChatComplianceStore-DOMAINSQL001.domain.com_Lync2013-[2013_06_05][13_10_34].log'
At line:1 char:1
+ Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn DOMAINSQL001.mylynclab.c ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:SourceCollection) [Install-CsDatabase], DbSetupDatabaseInUnusableStateException
    + FullyQualifiedErrorId : InstallDatabaseInternalFailure,Microsoft.Rtc.Management.Deployment.InstallDatabaseCmdlet
VERBOSE: Successfully installed the database. For details, see the following log:
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Create-PersistentChatComplianceStore-DOMAINSQL001.domain.com_Lync2013-[2013_06_05][
13_10_34].log"
VERBOSE: No changes were made to the Central Management Store.
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsDatabase-817afad5-d1d5-42dc-a4cf-70589c7bdd09.html".
WARNING: Install-CsDatabase encountered errors. Consult the log file for a detailed analysis, and ensure all errors (4) and warnings (2) are
 addressed before continuing.
WARNING: Detailed results can be found at
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsDatabase-817afad5-d1d5-42dc-a4cf-70589c7bdd09.html".

As you can see in the above output, I had two failures in the upgrade process. These failures were on the ‘mgc’ and the ‘mgccomp’ database, which both happen to be Persistent Chat databases. The reason for this was that I didn’t check if they were running on the Primary SQL instance back in Step 3 (I did this for the example to show what happens when you don’t do this. Really you should have done this check back in Step 3). So now when I check the status of the Persistent Chat databases with the Database Mirror Manager I notice that they are both on the Secondary SQL instance:


To change these back over I just clicked on the Primary check boxes for both of these databases and then click the Invoke button. Within the Powershell window you will be asked if you want to change the PersistentChat and PersistentChatCompliance databases over to Primary, which you answer “y” to:

Invoking change of PersistentChat database to Primary

Confirm
Are you sure you want to perform this action?
Performing operation "Invoke-CsDatabaseFailover" on Target "PersistentChatService".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y

Invoking change of PersistentChatCompliance database to Primary

Confirm
Are you sure you want to perform this action?
Performing operation "Invoke-CsDatabaseFailover" on Target "PersistentChatService".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y

---------------------------------------------------

Now the Persistent Chat databases are running back on the Primary SQL. So run the Install-CsDatabase command again to ensure that the Persistent Chat databases are also updated:

PS C:\Users\Administrator.DOMAIN> Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn DOMAINSQL001.domain.com -Verbose
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsDatabase-01cfc038-b340-4894-91a1-55d3864d7c2c.xml".
VERBOSE: Install databases required by Lync Server role(s).
VERBOSE: Skipping Central Management Database "1-CentralMgmtStore-1". Central Management Databases are installed using the
-CentralManagementDatabase parameter.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.BlobStore'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rtcxds.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.RtcSharedDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rtcshared.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.AbsDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rtcab.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.RgsConfigDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rgsconfig.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.RgsDynDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database rgsdyn.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.CpsDynDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database cpsdyn.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.ArchivingDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database LcsLog.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.MonitoringDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database LcsCDR.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.QoEMetricsDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database QoEMetrics.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.MgcDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database mgc.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.MgcCompDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database mgccomp.
VERBOSE: All databases at the specified installation location are already up to date.
VERBOSE: No changes were made to the Central Management Store.
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsDatabase-01cfc038-b340-4894-91a1-55d3864d7c2c.html".
VERBOSE: "Install-CsDatabase" processing has completed successfully.
VERBOSE: Detailed results can be found at
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsDatabase-01cfc038-b340-4894-91a1-55d3864d7c2c.html".
PS C:\Users\Administrator.DOMAIN>

Now our Application database schema has been updated and is ready to run all the new features of CU1.

Step 6: Re-establish the Database Mirror

Run the following command:

Install-CsMirrorDatabase -DatabaseType Application -SqlServerFQDN DOMAINSQL001.domain.com -SqlInstanceName Lync2013 -FileShare \\DOMAINSQL001.domain.com\FileShare -Verbose

Command output example:

PS > Install-CsMirrorDatabase -DatabaseType Application -SqlServerFQDN DOMAINSQL001.domain.com -SqlInstanceName Lync2013 -FileShare "\\DOMAINSQL001.domain.com\Fil
eShare" -Verbose
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsMirrorDatabase-be00671d-7932-4f68-b657-66a9b3c560e6.xml".

Install Mirror Database
This cmdlet sets up mirroring for databases on primary SQL Server instance on the mirror SQL Server instance. If a witness is specified, it also sets up a witness for databases on the primary SQL Server instance.

 The following databases will be mirrored and configured with a witness if a witness is specified:
    Database Name:rgsconfig
        Data File:C:\CsData\ApplicationStore\Lync2013\DbPath\rgsconfig.mdf
         Log File:C:\CsData\ApplicationStore\Lync2013\LogPath\rgsconfig.ldf
      Primary SQL: DOMAINSQL001.domain.com\Lync2013
          Account: DOMAIN\DOMAINSQL001$
       Mirror SQL: DOMAINSQL002.domain.com\Lync2013
          Account: DOMAIN\DOMAINSQL002$
     Witness SQL : DOMAINSQL003.domain.com\Lync2013
          Account: DOMAIN\DOMAINSQL003$


    Database Name:rgsdyn
        Data File:C:\CsData\ApplicationStore\Lync2013\DbPath\rgsdyn.mdf
         Log File:C:\CsData\ApplicationStore\Lync2013\LogPath\rgsdyn.ldf
      Primary SQL: DOMAINSQL001.domain.com\Lync2013
          Account: DOMAIN\DOMAINSQL001$
       Mirror SQL: DOMAINSQL002.domain.com\Lync2013
          Account: DOMAIN\DOMAINSQL002$
     Witness SQL : DOMAINSQL003.domain.com\Lync2013
          Account: DOMAIN\DOMAINSQL003$


    Database Name:cpsdyn
        Data File:C:\CsData\ApplicationStore\Lync2013\DbPath\cpsdyn.mdf
         Log File:C:\CsData\ApplicationStore\Lync2013\LogPath\cpsdyn.ldf
      Primary SQL: DOMAINSQL001.domain.com\Lync2013
          Account: DOMAIN\DOMAINSQL001$
       Mirror SQL: DOMAINSQL002.domain.com\Lync2013
          Account: DOMAIN\DOMAINSQL002$
     Witness SQL : DOMAINSQL003.domain.com\Lync2013
          Account: DOMAIN\DOMAINSQL003$



 Verify that the following things are taken care of before proceeding:
    Port 5022 is accessible through the firewall if Windows Firewall is enabled in the primary SQL Server
DOMAINSQL001.domain.com\Lync2013.
    Port 5022 is accessible through the firewall if Windows Firewall is enabled in the mirror SQL Server
DOMAINSQL002.domain.com\Lync2013.
    Port 7022 is accessible through the firewall if Windows Firewall is enabled in the witness SQL Server
DOMAINSQL003.domain.com\Lync2013.
    Accounts running the SQL Servers on all primary and mirror SQL servers have read/write permissions to the file share
\\DOMAINSQL001.domain.com\FileShare


    The cmdlet will use WMI provider to find the account information for SQL Server services running on all primary, mirror and witness
servers. Verify that WMI provider is running on all these servers.


    The cmdlet will try to create folders for data and log files for all the mirror servers. Verify that the account running this cmdlet has
 permission to create these folders.
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
VERBOSE: Mirroring was configured successfully for database "rgsconfig".
VERBOSE: Witness was configured successfully for database "rgsconfig".
VERBOSE: Mirroring was configured successfully for database "rgsdyn".
VERBOSE: Witness was configured successfully for database "rgsdyn".
VERBOSE: Mirroring was configured successfully for database "cpsdyn".
VERBOSE: Witness was configured successfully for database "cpsdyn".
VERBOSE: Successfully created SQL Server Agent jobs on DOMAINSQL002.domain.com\Lync2013.
VERBOSE: No changes were made to the Central Management Store.
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsMirrorDatabase-be00671d-7932-4f68-b657-66a9b3c560e6.html".
VERBOSE: "Install-CsMirrorDatabase" processing has completed successfully.
VERBOSE: Detailed results can be found at
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsMirrorDatabase-be00671d-7932-4f68-b657-66a9b3c560e6.html".
PS C:\Users\Administrator.DOMAIN>

Note: If you get an RPC error at this point like the example I've provided below, it’s likely caused by ports being blocked on the Windows Firewall of the SQL servers.
PS > Install-CsMirrorDatabase -DatabaseType Application -SqlServerFQDN DOMAINSQL001.domain.com -SqlInstanceName Lync2013 -FileShare "\\DOMAINSQL001.domain.com\FileShare" -Verbose
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsMirrorDatabase-20abaefd-828b-4920-b221-6d15774ea486.xml".
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsMirrorDatabase-20abaefd-828b-4920-b221-6d15774ea486.html".
WARNING: Install-CsMirrorDatabase failed.
WARNING: Detailed results can be found at
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsMirrorDatabase-20abaefd-828b-4920-b221-6d15774ea486.html".
Install-CsMirrorDatabase : Command execution failed: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
At line:1 char:1
+ Install-CsMirrorDatabase -DatabaseType Application -SqlServerFQDN DOMAINSQL001. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Install-CsMirrorDatabase], COMException
    + FullyQualifiedErrorId : ProcessingFailed,Microsoft.Rtc.Management.Deployment.InstallMirrorDatabaseCmdlet

From the testing that I have done, I’ve found that the Ports that need to be open to avoid these errors are TCP 135, TCP 445 and TCP 49154-49155. This is in addition to the SQL Mirroring signalling ports that also need to be opened: TCP 5022 on the Primary and Secondary servers, and  TCP 7022 on the Witness server (also the regular SQL ports UDP 1434, TCP 1433, and the Dynamic TCP port used when Named SQL database is used).

Step 7: Confirm that the databases are all back up and running

Check the state of the database mirror:

Get-CsDatabaseMirrorState -PoolFqdn melbfepool.domain.com -Verbose

Note: You could also do this check with the Mirror Manager Tool. However, just in case there is some edge case where the mirror has failed to re-establish (with an error I haven’t seen before), it’s probably best to use the command in this circumstance.

PS C:\Users\Administrator.DOMAIN> Get-CsDatabaseMirrorState -PoolFqdn melbfepool.domain.com -Verbose
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Get-CsDatabaseMirrorState-22e57066-60a0-4d5a-a699-3e7e0fcf3894.
xml".
VERBOSE: Primary SQL Server Instance: DOMAINSQL001.domain.com\Lync2013
VERBOSE: Mirror SQL Server Instance: DOMAINSQL002.domain.com\Lync2013


DatabaseName             : rtcab
StateOnPrimary           : Principal
StateOnMirror            : Mirror
MirroringStatusOnPrimary : synchronized
MirroringStatusOnMirror  : synchronized

DatabaseName             : rtcxds
StateOnPrimary           : Principal
StateOnMirror            : Mirror
MirroringStatusOnPrimary : synchronized
MirroringStatusOnMirror  : synchronized

DatabaseName             : rtcshared
StateOnPrimary           : Principal
StateOnMirror            : Mirror
MirroringStatusOnPrimary : synchronized
MirroringStatusOnMirror  : synchronized

VERBOSE: Primary SQL Server Instance: DOMAINSQL001.domain.com\Lync2013
VERBOSE: Mirror SQL Server Instance: DOMAINSQL002.domain.com\Lync2013
DatabaseName             : lcscdr
StateOnPrimary           : Principal
StateOnMirror            : Mirror
MirroringStatusOnPrimary : synchronized
MirroringStatusOnMirror  : synchronized

DatabaseName             : qoemetrics
StateOnPrimary           : Principal
StateOnMirror            : Mirror
MirroringStatusOnPrimary : synchronized
MirroringStatusOnMirror  : synchronized

VERBOSE: Primary SQL Server Instance: DOMAINSQL001.domain.com\Lync2013
VERBOSE: Mirror SQL Server Instance: DOMAINSQL002.domain.com\Lync2013
DatabaseName             : lcslog
StateOnPrimary           : Principal
StateOnMirror            : Mirror
MirroringStatusOnPrimary : synchronized
MirroringStatusOnMirror  : synchronized

VERBOSE: Primary SQL Server Instance: DOMAINSQL001.domain.com\Lync2013
VERBOSE: Mirror SQL Server Instance: DOMAINSQL002.domain.com\Lync2013
DatabaseName             : rgsconfig
StateOnPrimary           : Principal
StateOnMirror            : Mirror
MirroringStatusOnPrimary : synchronized
MirroringStatusOnMirror  : synchronized

DatabaseName             : rgsdyn
StateOnPrimary           : Principal
StateOnMirror            : Mirror
MirroringStatusOnPrimary : synchronized
MirroringStatusOnMirror  : synchronized

DatabaseName             : cpsdyn
StateOnPrimary           : Principal
StateOnMirror            : Mirror
MirroringStatusOnPrimary : synchronized
MirroringStatusOnMirror  : synchronized

VERBOSE: Primary SQL Server Instance: DOMAINSQL001.domain.com\Lync2013
VERBOSE: Mirror SQL Server Instance: DOMAINSQL002.domain.com\Lync2013
DatabaseName             : xds
StateOnPrimary           : Principal
StateOnMirror            : Mirror
MirroringStatusOnPrimary : synchronized
MirroringStatusOnMirror  : synchronized

DatabaseName             : lis
StateOnPrimary           : Principal
StateOnMirror            : Mirror
MirroringStatusOnPrimary : synchronized
MirroringStatusOnMirror  : synchronized

VERBOSE: No changes were made to the Central Management Store.
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Get-CsDatabaseMirrorState-22e57066-60a0-4d5a-a699-3e7e0fcf3894.
html".
VERBOSE: "Get-CsDatabaseMirrorState" processing has completed successfully.
VERBOSE: Detailed results can be found at
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Get-CsDatabaseMirrorState-22e57066-60a0-4d5a-a699-3e7e0fcf3894.
html".

PS >

From the above output you will see that rgsconfig, rgsdyn, and cpsdyn are back in Principal state on the Primary server.

Step 8 (Optional): If you have your Archiving and Monitoring databases on a different SQL backend than the main Lync databases are stored you need to run the install on it now:

Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn DOMAINARC001.domain.com -Verbose

Step 9: After we have finished updating all the Lync databases we need to now update the CMS database with the following command:

Install-CsDatabase -CentralManagementDatabase –SqlServerFqdn DOMAINSQL001.domain.com -SqlInstanceName Lync2013 –Verbose

The output of the command will look something like this:

PS C:\Users\Administrator.DOMAIN> Install-CsDatabase -CentralManagementDatabase -SqlServerFqdn DOMAINSQL001.domain.com -SqlInstanceName Lync2013 -Verbose
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsDatabase-6b47e723-1091-4669-bb19-c1d673ad5612.xml".
VERBOSE: Install databases required by Lync Server role(s).
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.XdsDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database xds.
VERBOSE: Assigning "CentralMgmtStore:XdsDatabase:LogPath" to C:\CsData
VERBOSE: Assigning "CentralMgmtStore:LisDatabase:LogPath" to C:\CsData
VERBOSE: Assigning "CentralMgmtStore:XdsDatabase:DbPath" to C:\CsData
VERBOSE: Assigning "CentralMgmtStore:LisDatabase:DbPath" to C:\CsData
VERBOSE: Installing "CentralMgmtStore" on DOMAINSQL001.domain.com\Lync2013, collocated: False
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.XdsDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database xds.
Checking state for database xds.
Checking state for database xds.
State of database xds is DbState_RequiresMinorUpgrade.
Database xds set to mode Restricted.
Dropping all procedures, functions and views from database xds.
Executing Xds.sql...
Adding master role...
Setting database state to active...
Setting owner for database xds to sa.
Creating login DOMAIN\RTCUniversalConfigReplicator.
Creating user DOMAIN\RTCUniversalConfigReplicator.
Creating Schema DOMAIN\RTCUniversalConfigReplicator.
Creating login DOMAIN\RTCUniversalReadOnlyAdmins.
Creating user DOMAIN\RTCUniversalReadOnlyAdmins.
Creating Schema DOMAIN\RTCUniversalReadOnlyAdmins.
Creating login DOMAIN\RTCUniversalServerAdmins.
Creating user DOMAIN\RTCUniversalServerAdmins.
Creating Schema DOMAIN\RTCUniversalServerAdmins.
Adding account DOMAIN\RTCUniversalReadOnlyAdmins to role ConsumerRole.
Adding account DOMAIN\RTCUniversalConfigReplicator to role ReplicatorRole.
Adding account DOMAIN\RTCUniversalServerAdmins to role PublisherRole.
Setting database version: Schema Version 10, Sproc Version 13, Update Version 2.
Setting the database xds to multi user mode.
Database xds is set to multi user mode.
****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.LisDatabase'****
Trying to connect to Sql Server DOMAINSQL001.domain.com\Lync2013. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Checking state for database lis.
Database created by script "LisDatabase" already exists and is current.

VERBOSE: Successfully installed the database. For details, see the following log:
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Create-CentralMgmtStore-DOMAINSQL001.domain.com_Lync2013-[2013_06_05][17_01_59].log
"
VERBOSE: Creating new log file
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsDatabase-6b47e723-1091-4669-bb19-c1d673ad5612.html".
VERBOSE: "Install-CsDatabase" processing has completed successfully.
VERBOSE: Detailed results can be found at
"C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CsDatabase-6b47e723-1091-4669-bb19-c1d673ad5612.html".
PS C:\Users\Administrator.DOMAIN>

Step 10: To enable the Mobility service, run the following cmdlet:

Enable-CsTopology

Step 11: To enable the Unified Communications Web API (UCWA), you must run the Bootstrapper.exe tool again on all Lync Server 2013 servers on which the Web Components were installed and updated. The command to run the tool is as follows:

"%ProgramFiles%\Microsoft Lync Server 2013\Deployment\Bootstrapper.exe"

The command executes like this:

C:\Program Files\Common Files\Microsoft Lync Server 2013>"%ProgramFiles%\Microsoft Lync Server 2013\Deployment\Bootstrapper.exe"
Logging status to: C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Bootstrap-CsMachine-[2013_06_06][10_17_38].html
Checking prerequisites for bootstrapper...
Checking prerequisite WMIEnabled...prerequisite satisfied.
Checking prerequisite NoBootstrapperOnBranchOfficeAppliance...prerequisite satisfied.
Checking prerequisite SupportedOS...prerequisite satisfied.
Checking prerequisite NoOtherVersionInstalled...prerequisite satisfied.
Host name: DOMAINfe001.domain.com
Disabling unused roles...
Executing PowerShell command: Disable-CSComputer -Confirm:$false -Verbose -Report "C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Disable-CSComputer-[2013_06_06][10_17_48].html"
Checking prerequisites for roles...
Checking prerequisite SupportedOS...prerequisite satisfied.
Checking prerequisite SupportedOSNoDC...prerequisite satisfied.
Checking prerequisite SupportedSqlRtcLocal...prerequisite satisfied.
Checking prerequisite WMIEnabled...prerequisite satisfied.
Checking prerequisite NoOtherVersionInstalled...prerequisite satisfied.
Checking prerequisite PowerShell...prerequisite satisfied.
Checking prerequisite WindowsIdentityFoundation...prerequisite satisfied.
Checking prerequisite SupportedServerOS...prerequisite satisfied.
Checking prerequisite NoUnsupportedWinFab...prerequisite satisfied.
Checking prerequisite SupportedSqlLyncLocal...prerequisite satisfied.
Checking prerequisite IIS...prerequisite satisfied.
Checking prerequisite IIS7Features...prerequisite satisfied.
Checking prerequisite ASPNet...prerequisite satisfied.
Checking prerequisite KB2646886Installed...prerequisite satisfied.
Checking prerequisite BranchCacheBlock...prerequisite satisfied.
Checking prerequisite WCF...prerequisite satisfied.
Checking prerequisite WindowsMediaFoundation...prerequisite satisfied.
Checking prerequisite SqlInstanceRtcLocal...prerequisite satisfied.
Checking prerequisite VCredist...prerequisite satisfied.
Checking prerequisite SqlNativeClient...prerequisite satisfied.
Checking prerequisite SqlClrTypes...prerequisite satisfied.
Checking prerequisite SqlSharedManagementObjects...prerequisite satisfied.
Checking prerequisite UcmaRedist...prerequisite satisfied.
Checking prerequisite WinFab...prerequisite satisfied.
Checking prerequisite MicrosoftIdentityExtensions...prerequisite satisfied.
Checking prerequisite SqlInstanceLyncLocal...prerequisite satisfied.
Checking prerequisite RewriteModule...prerequisite satisfied.
Checking prerequisite SpeechPlatformRuntime...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_ca-ES_Herena...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_da-DK_Helle...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_de-DE_Hedda...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_en-AU_Hayley...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_en-CA_Heather...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_en-GB_Hazel...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_en-IN_Heera...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_en-US_Helen...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_es-ES_Helena...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_es-MX_Hilda...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_fi-FI_Heidi...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_fr-CA_Harmonie...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_fr-FR_Hortense...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_it-IT_Lucia...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_ja-JP_Haruka...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_ko-KR_Heami...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_nb-NO_Hulda...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_nl-NL_Hanna...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_pl-PL_Paulina...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_pt-BR_Heloisa...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_pt-PT_Helia...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_ru-RU_Elena...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_sv-SE_Hedvig...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_zh-CN_HuiHui...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_zh-HK_HunYee...prerequisite satisfied.
Checking prerequisite MSSpeech_TTS_zh-TW_HanHan...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_ca-ES_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_da-DK_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_de-DE_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_en-AU_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_en-CA_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_en-GB_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_en-IN_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_en-US_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_es-ES_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_es-MX_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_fi-FI_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_fr-CA_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_fr-FR_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_it-IT_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_ja-JP_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_ko-KR_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_nb-NO_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_nl-NL_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_pl-PL_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_pt-BR_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_pt-PT_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_ru-RU_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_sv-SE_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_zh-CN_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_zh-HK_TELE...prerequisite satisfied.
Checking prerequisite MSSpeech_SR_zh-TW_TELE...prerequisite satisfied.
Checking prerequisite UcmaWorkflowRuntime...prerequisite satisfied.
Installing any collocated databases...
Executing PowerShell command: Install-CSDatabase -Confirm:$false -Verbose -LocalDatabases -Report "C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Install-CSDatabase-[2013_06_06][10_17_54].html"
Enabling new roles...
This step will configure services, apply permissions, create firewall rules, etc.
Executing PowerShell command: Enable-CSComputer -Confirm:$false -Verbose -Report "C:\Users\Administrator.DOMAIN\AppData\Local\Temp\2\Enable-CSComputer-[2013_06_06][10_18_28].html"
Complete.
Log file was: %TEMP%\Bootstrap-CsMachine-[2013_06_06][10_17_38].html


And we’re done!

The Wrap Up


It’s safe to say that updating a Lync server with a Mirrored Database is a bit more involved than doing a single database server. It’s one of those processes that if taken lightly might cause you some grief in the real world. Hopefully this post will help to make your life a little easier.


Read more →

Popular Posts