At work we often use the Port Querycommand to test connectivity to services running on servers. We have a bunch of firewalls scattered all over the place and most of the time issues with Lync are due to firewall updates not having been made. The advantage to PortQry is that it can probe for UDP ports as opposed to just TCP ports that the built-in Windows Telnet client can test.
I don’t have time to memorize the command line switches for every command I run. Fortunately, there is also a GUI version of PortQry called PortQueryUI. (Note that Microsoft documentation refers to this as PortQryUI but the name of the executable is PortQueryUI. For readability purposes, I will use the latter.) Aside from not having to memorize any command line parameters, PortQueryUI let’s you easily run standard tests by selecting them from a drop down list.
The entries in the list are defined by an XML file named config.xml. If you open this file you will see the service lists followed by the relevant ports to query. For example, this is the entry for SQL Service:
<Service Name=”SQL Service”>
<Port Name=”ms-sql-s service” Protocol=”UDP” Value=”1434″/>
<Port Name=”ms-sql-s service” Protocol=”TCP” Value=”1433″/>
It’s easy enough to figure out how to add your own entries. Simply create a new Service Name entry and under that define the ports you want to query. So I went ahead and created a bunch of these Service Names for all manner of Lync communication – 22 in total. I based my work off the very useful Windows Phone app Lync Protocol&Ports.
Some things to note:
- Not all ports will be open, even if they are the correct ports. This is primarily true of the Audio port ranges (50,000-59,999 TCP/UDP). This does not mean you have a problem.
- In order to minimize perceived errors, these ranges are the last ones in a given batch to run.
- For the Office 365 tests, you will need to figure out to which server you are connected. You can do this by looking at the Configuration Information found via the icon in the notification area of Windows.
- The original config.xml names have been updated from “Lync” to “Skype for Business” but the ports remain the same.
Most likely I missed some ports and some options. Feel free to leave a comment and I’ll update the file with the corrections, additions, and other updates..