Nick Smith and Scott Stubberfield have updated a previous script of theirs which lists all the users connected to a Registrar pool along with the client version of the endpoint they used to log on to the system. According to Nick, updates made since the time the previous script was published include the following:

The script outputs the results to the screen instead of a .CSV file. This allows administrators to pipe the results to cmdlets like Where-Object.

The script prompts for the pool FQDN and automatically queries all servers that are members of the pool.

There are two versions of the script.

The Get-PoolUserRegistrations.ps1 script connects directly to the SQL instance on the remote server. This requires that the Windows firewall be disabled or configured to allow SQL connections.

The Get-PoolUserRegistrations_Remoting.ps1 script (this one) uses Windows PowerShell remoting to run the SQL query locally on each machine. With this script, the Windows firewall does not need to be disabled; however, you must run the Enable-PSRemoting cmdlet on each server in order to allow remote connections.

The net result is that anyone running the script will get back data similar to this:

To make use of this script, copy the code shown below, paste it into a text editor (such as Notepad) and then save the script as a .PS1 file (for example, C:\Scripts\Get-PoolUserRegistrations.ps1). From the Lync Server Management Shell you can then run the script by referencing the script file path followed by the fully qualified domain name of the Registrar pool you want to return information from. For example:

This script is great, thanks! Are the results based on the users preferred registrar? We have two nodes in our pool, node1 and node2. Node1 is the only one active, Node2 is currently down. However when I run the script it still reports users are registered to Node2. Is this expected?