Posts Tagged ‘Lync Server Management Shell’

Script: Get-CsVoiceCalls.ps1 – See Realtime Call Info From Lync Management Shell

June 5th, 2012 29 comments


I had a need to see real-time call data. Lync MVP/MCM Tom Pacyk has a really cool script for logging concurrent calls to .csv over time by querying perfmon counters at regular intervals. That works great when you’re trying to determine concurrent for scale planning. But I wanted to see who was on the phone – not just the number of current calls.

This script will look at the LCSCDR database, which is installed when you install a Monitoring Server in your topology. The script gathers information about current calls in progress, and displays them in list style. It’s fairly basic.

Call between Lync users

Call between Lync users

As you can see, the list shows the two users in the call, their ID number, who initiated the call, when it was made, etc. In this screen shot, User 1 was connected from outside the environment (IsUser1Internal is false), while User2 was in a company office with WAN connectivity to the Lync infrastructure (IsUser2Internal is True).

If a user has initiated or received a call to/from a PSTN number, then User2Uri will read “PSTN call”.

Call to PSTN number

Call to PSTN number

As mentioned above, a Monitoring Server does need to be installed in your topology so that the LCSCDR database is created and updated. But the script can be run from anywhere.

You could also wrap this into a function and toss it in your PowerShell profile to make easily accessible.

This script was more of a proof of concept into querying SQL from PowerShell, and the required query. If you have suggestions, let me know!


Execution Policy: Third-party PowerShell scripts may require that the PowerShell Execution Policy be set to either AllSigned, RemoteSigned, or Unrestricted. The default is Restricted, which prevents scripts – even code signed scripts – from running. For more information about setting your Execution Policy, see Using the Set-ExecutionPolicy Cmdlet.

Download the script from below to a server with PowerShell. Run the script in PowerShell using

Get-CsVoiceCalls.ps1 -server [SQL server]

If the lcscdr database is in a named instance, specify the instance

Get-CsVoiceCalls.ps1 -server [SQL server] -instance [instance]

Where [SQL server] is the FQDN of the database server containing your LCSCDR database.

You can also hard code the SQL server FQDN and the instance in the script. Look for


and change it to include the SQL server FQDN, such as

[string]$server = "sqlserver.domain.local",

and look for


and change it to include the instance name, such as

[string]$instance = "Lync",

And then you can just call the script by name using


There is also full comment based help, using

Get-Help Get-CsVoiceCalls.ps1


I’ve never been one to really solicit donations for my work. My offerings are created because *I* need to solve a problem, and once I do, it makes sense to offer the results of my work to the public. I mean, let’s face it: I can’t be the only one with that particular issue, right? Quite often, to my surprise, I’m asked why I don’t have a “donate” button so people can donate a few bucks. I’ve never really put much thought into it. But those inquiries are coming more often now, so I’m yielding to them. If you’d like to donate, you can send a few bucks via PayPal at Money collected from that will go to the costs of my website (hosting and domain names), as well as to my home lab.

Known Issues

  1. The logic that looks for the database in named instances still needs more testing. If you run it in an environment where you have the lcscdr database in a named instance, please let me know your results.
  2. I tried to adapt to correcting the time display. The data is apparently stored in SQL in GMT. So I’ve coded the script to display it according to the local time zone (according to Windows). Let me know if your results aren’t as expected.
  3. If a user receives a call from a PSTN number, the SessionStartedById field is blank. Working around that has been problematic, but I’m still trying.



See the changelog for this script to see what has changed between versions.

Customizing the Lync Meeting Page – Part II

November 1st, 2011 4 comments

In part I, I showed you how to change the logo for the meeting landing page. In this part, we’ll go through adding options to the page for various types of clients.

By default, when entering a meeting, a machine with the Lync client will open up and automatically join. But what if the person attending the meeting doesn’t have the Lync client? A machine without the Lync client will open a popup browser window and use Silverlight, but that doesn’t support all Lync features.

silverlight client

silverlight client

We can allow users with the OCS 2007 R2 legacy Communicator client to use that to join the meeting. We simply open Lync Management Shell and use the Set-CsWebServiceConfiguration cmdlet on our Front-End servers:

Set-CsWebServiceConfiguration -ShowJoinUsingLegacyClientLink $true

And the web page looks like this when opened:

Join using legacy client

Join using legacy client

We can also provide a link for attendees to download the Lync 2010 Attendee client, which provides a better client experience. We can do this by using the same cmdlet in Lync Management Shell, but with a different switch:

Set-CsWebServiceConfiguration -ShowDownloadCommunicatorAttendeeLink $true

Combining the two together allows all possible options:

Set-CsWebServiceConfiguration -ShowDownloadCommunicatorAttendeeLink $true -ShowJoinUsingLegacyClientLink $true

At this point, attendees can join the meeting with the OCS Communicator, Lync, Lync Attendee, or web browser clients. The user would see this (assuming no Lync client installed):

Allow legacy and attendee clients

Allow legacy and attendee clients

Combine that with the custom logo configuration from part 1, and we now have a much more personal and flexible Meet page.

Some Lync Users Can’t Communicate to Federated Contacts and ‘Federation is disabled’ Appears in Snooper logs

October 20th, 2011 5 comments

In this scenario, IM & Presence would work for some users to federated contacts, but wouldn’t work for others.

Federated User Access was enabled in the Global External Access Policy and in the Global Access Edge Configuration policy. The target domain was in the Federated Domains list as an allowed domain. There was no discernable pattern as to what users could communicate with federated contacts, and what users could not. They were spread across various Front End servers, OUs, etc. Various clients on the workstation made no difference.

When looking at logs in Snooper on the front end that the user connects to, “Federation is disabled” would appear when the user attempted to send a message out:Â

09/16/2011|13:09:13.108 FB8:109C INFO :: SIP/2.0 504 Server time-out
Proxy-Authentication-Info: Kerberos qop=”auth”, opaque=”59715D13″, srand=”DF93B1E9″, snum=”16″, rspauth=”040401ffffffffff0000000000000000450a1d9cc165348ae016ee91″, targetname=”sip/”, realm=”SIP Communications Service”, version=4
From: “user, test”<>;tag=94a0d94c10;epid=67fd7944cb
To: <>;tag=6E14486DE28A93804279A401E6E7A4CF
Call-ID: db3c59b759ef4065adb458d54d03a687
Via: SIP/2.0/TLS;ms-received-port=58376;ms-received-cid=63500
ms-diagnostics: 1065;reason=”Federation is disabled“;domain=””;source=””
Server: RTC/4.0
Content-Length: 0

And traffic for this user would never get to the Access Edge servers. This was the case for ANY federated contacts the “broken” users would attempt to communicate with. Yet, other workers wouldn’t have ANY problem communicating to these same federated contacts. In fact, a “good” user could log onto a test workstation, launch Communicator, and it would work – but then close Communicator and launch Communicator as a “broken” user and not be able to communicate – even from the same Windows session. There was no pattern other than “broken” users would always be broken, and working users would always work.

Many things were inspected, and I tried doing things such as disabling the users in Lync and then re-enabling them. I drain stopped the Front End server that was the user’s preferred server to force them onto another server – no luck.

PSS spent several weeks on this one. Everything was configured correctly. What we decided to try was to set the Minimum session security for NTLM SSP based clients & servers. By default, a Windows 2008 R2 server has both settings set to 128-bit minimum. But Windows XP and earlier clients default to only 40-bit. It didn’t make much sense that this would work since we could duplicate both working and broken users on the same machine. But it was worth a shot. Here’s what we did.

Open the Local Security Policy and navigate to Local Policies>Security Options. Find the Network security: Minimum session security for NTLM SSP based (including secre RPC) clients & servers settings, as shown below:

Minimum session security for NTLM SSP based (including secure RPC) clients

Minimum session security for NTLM SSP based (including secure RPC) clients

Double click on each and clear the Require 128-bit encrytion checkbox as shown below:

Disabling Require 128-bit encryption

Minimum session security for NTLM SSP based (including secure RPC) clients

The settings should now show “No minimum” in the Local Security Policy as shown below:

Minimum session security for NTLM SSP based (including secure RPC) clients

Minimum session security for NTLM SSP based (including secure RPC) clients

The settings don’t take effect until the server is rebooted. We performed this process on all of the Lync servers in the environment. Incidentally, the settings just change some registry keys. So we can instead change the values using the following PowerShell lines, which will make their way into my server build scripts:

Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0" -Name "NtlmMinClientSec" -Value 0 Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0" -Name "NtlmMinServerSec" -Value 0

After the servers were rebooted, and user connections reestablished (which took some time), the problem disappeared. All users were able to communicate with federated contacts.

Lync Posters, Templates, and Cheat Sheets

October 13th, 2011 No comments


Microsoft Lync Server 2010 Protocol Workloads Poster

This poster shows each workload in Microsoft Lync Server 2010 communications software, describing relationships, dependencies, flow of information, and certificate requirements.

Visio templates

Lync Server 2010

This stencil provides over 125 shapes to help you create a visual presentation of your Lync Server architecture.

Office Communications Server 2007 and 2007 R2

The Office Communications Server 2007 and 2007 R2 Visio stencils contain icons for Office Communications Server 2007 and 2007 R2 server roles and components.

Cheat Sheets

Lync Server 2010 PowerShell Cheat Sheet

A quick reference card for PowerShell use with Lync Server 2010.

Microsoft Lync 2010 Quick Reference Cards

This zipped file contains the quick reference cards for Microsoft Lync 2010. They are all in Microsoft Word, and can be edited as needed. The download contains the following Quick Reference Cards, which are also available separately:

Exchange and Lync Session Videos From Tech·Ed 2011

September 29th, 2011 No comments

One Liners: Finding Out Which Lync Pool Servers a User is Associated With, and the Preferred Connection Order

August 31st, 2011 2 comments

Lync 2013 logo 128x128Sometimes, you need to do some Lync logging to investigate a problem with a user. If you have multiple servers in a pool, you sometimes have to enable logging on each until you figure out which one the client is actually connecting to. We can find out which servers the user is associated with and the preferred order that the client will connect using the following in the Lync Management Shell:


Such as:


The output shows us the primary and backup pool FQDNs, and the order in which it will connect to servers in each pool.

PrimaryPoolFqdn                     : lyncpool01.contoso.local
BackupPoolFqdn                      : lyncpool02.contoso.local
UserServicesPoolFqdn                : lyncpool01.contoso.local
PrimaryPoolMachinesInPreferredOrder : {1:2-2, 1:2-1}
BackupPoolMachinesInPreferredOrder  : {1:3-2, 1:3-1}

But what that doesn’t tell us, is the actual names of the servers in the pool, and which one is 1:2-2, and 1:2-1, etc. So we expand a little further and use:

Get-CsUserPoolInfo -Identity "user" | Select-Object -ExpandProperty PrimaryPoolMachinesInPreferredOrder

For example,

Get-CsUserPoolInfo -Identity "prichard" | Select-Object -ExpandProperty PrimaryPoolMachinesInPreferredOrder

This will show the registrar pools and their respective servers in the preferred order the user will connect:

MachineId         : 1:2-2
Cluster           : 1:2
Fqdn              : lyncpoolserver03.contoso.local
PrimaryMacAddress : 000000
Topology          : Microsoft.Rtc.Management.Deploy.Internal.DefaultTopology
MachineId         : 1:2-1
Cluster           : 1:2
Fqdn              : lyncpoolserver02.contoso.local
PrimaryMacAddress : 000000
Topology          : Microsoft.Rtc.Management.Deploy.Internal.DefaultTopology

We see that this user will connect to lyncpoolserver03 first, since it’s listed first. If that server is not available, then the user would be redirected to lyncpoolserver02. Note that this only shows the information for the primary pool. If you have a backup pool, the information for those servers is not shown here (but is shown if you use BackupPoolMachinesInPrefferedOrder as the ExpandedPropery). However, if you do have a backup registrar pool, and want to use it as a backup pool for users homed on the first, you should have Director servers, as mentioned in Another Reason to Include a Director in Your Lync Server 2010 Deployment.

We can then wrap this in a function:

function Get-CsUserConnectionInfo {
 param (
  [parameter(ValueFromPipeline, ValueFromPipelineByPropertyName, Mandatory, HelpMessage = "No username specified")]
  [string] $user
 Get-CsUserPoolInfo –Identity $user | Select-Object –ExpandProperty PrimaryPoolMachinesInPreferredOrder
} # end function Get-CsUserConnectionInfo

For easy access. Toss it into your PowerShell profile and access it using


Also, the Get-CsConnections.ps1 script will show you the current connections on a per-user basis if needed.

Script: Get-CsConnections.ps1 – See User Connections, Client Versions, Load Balancing in Lync & Skype for Business Server

August 11th, 2011 200 comments

Lync 2013 logo 128x128Tracy A. Cerise and Mahmoud Badran came up with a script to show Lync connections, and the users connected. This was quite informative as it could be used to show load balance distribution, client versions being used, and more.

I took the script and updated it a little, including:

  1. Removed the help function and the header block and inserted comment based help. So a user can run get-help Get-CsConnections.ps1 and get the help, just like any other script and cmdlet.
  2. Added a parameter to display the user list. My needs didn’t require the user list – just the statistics at the beginning. So I added the feature to show the user list by running Get-CsConnections.ps1 -IncludeUsers.
  3. Added a couple of functions, including one that cleans up some variables when exiting.
  4. Adjusted some of the formatting. I noticed things didn’t always line up when the server FQDNs were really long, like those in child domains.
  5. Did a prereq check to verify the Lync module is loaded. If not, it gets loaded. That way, the script will still run fine if it’s run from an ordinary PowerShell console.
  6. Accounted for the pool parameter being just a NetBIOS name by adding the $env:userdnsdomain to the NetBIOS name to create the FQDN. This appears to work fine if the Lync servers and user running the script are both in the same domain. If not, then an FQDN would be required.
  7. Renamed the script to Get-CsConnections.ps1 and some of the functions to the normal verb-noun format.
  8. Added a feature to show just a specific client version number, and the users connected with that client version. This can help you determine who is connecting with what versions, which is helpful when looking into licensing, upgrades, etc.
  9. Added support for Lync Server 2013, which uses a different query than Lync Server 2010.
  10. Tons more info in updates and releases following that. See the changelog for more info.


Get-CsConnections.ps1 [[-Pool] ] [[-SIPAddress] ] [[-FilePath] ] [-IncludeUsers] [-IncludeHighUsers] [-IncludeSystem] [[-UserHighConnectionFlag] ] [[-ClientVersion] ] [-ShowFullClient] [ShowTotal] [[-Server] ] [-WhatIf] [-Confirm] []

Run the script specifying the front end pool or server to target:

Get-CsConnections.ps1 -Pool [pool FQDN]


Get-CsConnections.ps1 -Server [server FQDN]

The script automatically determines the version (2010 or 2013) of the pool, and uses the correct query.

If I can find an auto-detect method for server versions, I’ll include that in a later build.

Will show you unique client versions, their user agent, and the number of connections for each:

Current connected users listed by client name/version

Current connected users listed by client name/version

Distribution of connections across frontend servers (load balancing):

Connections by server (load balancing)

Connections by server (load balancing)

The number of unique users and clients connected:

Total unique users and clients

Total unique users and clients

And, adding the -IncludeUsers switch, such as:

Get-CsConnections.ps1 -Pool [pool FQDN] -IncludeUsers

will also show the users who are connected, and the number of connections they each have:

Connections per user

Connections per user

Using -IncludeHighUsers instead of -IncludeUsers will only list those users who meet the UserHighConnectionFlag (shown in white) or exceed the UserHighConnectionFlag (shown in red).

Get-CsConnections.ps1 -SipAddress [sip address] -Pool [pool FQDN]

Will show you the information for a single user:

Connection info for a specific user

Connection info for a specific user

Get-CsConnections.ps1 -Pool [pool FQDN] -ClientVersion [version number]

Will show the connection data for just that version number, including listing the users connected with that client version. This is helpful if the first method lists some version numbers you’d like to track down. Here, I used a client version of 13.1. MC/13.1.x is the OCS client on the Mac.

Connections by client version

Connections by client version

Using the -ShowFullClient option will show extended info for client name/version. However, the previous ‘Client Version’ column is not shown due to formatting restrictions. Here we can see more info, especially about mobile devices, Lync Phone Edition, and Mac clients.

Show Full Client extended info

Show Full Client extended info

Using -ShowTotal will also add additional info to the bottom section, including total number of users who are Lync enabled, total who are voice enabled, and percentage of total Lync enabled users who are connected.

ShowTotal option with totals and percentage

ShowTotal option with totals and percentage

You can export the info to a .csv file for viewing/manipulation in Excel using:

Get-CsConnections.ps1 -Pool [pool FQDN] -FilePath [path to csv file]


Execution Policy: Third-party PowerShell scripts may require that the PowerShell Execution Policy be set to either AllSigned, RemoteSigned, or Unrestricted. The default is Restricted, which prevents scripts – even code signed scripts – from running. For more information about setting your Execution Policy, see Using the Set-ExecutionPolicy Cmdlet.

NOTE: In order to gain remote access to each Front End server’s RTCLOCAL database where connection information is found, you need to open two local firewall ports; one static UDP port (1434), and one dynamic TCP port. We can use netsh to open the two required ports. First, open an elevated command prompt, and paste the following line. You should get “Ok.” in return:

netsh advfirewall firewall add rule name="SQL Browser (UDP 1434)" dir=in action=allow protocol=UDP localport=1434 profile=domain description="Created for Get-CsConnections.ps1. For more information, see"

Next, find the dynamically assigned port used by the Named Instance (RTCLOCAL):

  • On the Front End server, open SQL Server Configuration Manager.
  • Expand SQL Server Network Configuration.
  • Click on Protocols for RTCLOCAL.
  • On the right side, right click on TCP/IP, and choose Properties.
  • Click on the IP Addresses tab.
  • Scroll to the last section, called IPAll.
  • Note the TCP Dynamic Ports value


Replace [dynamic port] in the code below with the dynamic port number, and run the entire following command:

netsh advfirewall firewall add rule name="SQL RTCLOCAL Dynamic Port (tcp-in)" dir=in action=allow protocol=TCP localport=[dynamic port] profile=domain description="Created for Get-CsConnections.ps1. For more information, see"

If you look at the inbound rules for the firewall, you’ll now see the two new rules:


Repeat the process for both ports on each Front End server.

Note: The dynamically assigned port is unique to each Front End server, not the pool. So you’ll need find the value on each server. Once the two ports are open on each Front End server in the pool, the script should work fine.

Thanks to James Cussen for explaining what config is needed for SQL access through the firewall.


I’ve never been one to really solicit donations for my work. My offerings are created because *I* need to solve a problem, and once I do, it makes sense to offer the results of my work to the public. I mean, let’s face it: I can’t be the only one with that particular issue, right? Quite often, to my surprise, I’m asked why I don’t have a “donate” button so people can donate a few bucks. I’ve never really put much thought into it. But those inquiries are coming more often now, so I’m yielding to them. If you’d like to donate, you can send a few bucks via PayPal at Money collected from that will go to the costs of my website (hosting and domain names), as well as to my home lab.


v3.5 – 08-14-2019 –

v3.4 – 03-27-2018 –

v3.3 – 01-0-2017 –

v3.2 – 11-17-2016 –

v3.1 – 04-07-2016 –

v3.0 – 09-09-2015 –

v2.9 – 10-28-2014 –

v2.8 – 06-10-2014 –

v2.7 – 05-24-2014 –

v2.6 – 02-08-2014 –

v2.5 – 11-26-2013 –

v2.4 – 09-13-2013 –

v2.3 – 08-01-2013 –

v2.2 – 05-10-2013 –

v2.1 – 12-13-2012 –

v2.0 – 10-16-2012 –

v1.9 – 09-21-2012 –

v1.8 – 09-14-2012 –

v1.7 –

v1.6 –

v1.4 –

v1.3 –

v1.0 –


See the changelog for a complete list of features added in each release

One Liners: Finding AD Disabled Accounts Who are Still Lync/Skype for Business Enabled

August 10th, 2011 18 comments

Lync 2013 logo 128x128Fellow MVP Jeff Guillet wrote an article about the fact that disabling a user’s Active Directory account doesn’t mean they can’t log into Lync/Skype for Business. This is due to the way Lync uses certificates and authentication based on them. I highly recommend you read the article.

I recently was writing some documentation for a customer and wanted to include this important information, including methods for resolving the problem after the fact.

If you’ve not been disabling users in Lync while disabling them in AD, here’s a one liner to find those users:

Get-CsAdUser -ResultSize Unlimited | Where-Object {$_.UserAccountControl -match "AccountDisabled" -and $_.Enabled -eq $true} | Format-Table Name,Enabled,SipAddress -auto

You can shorten it somewhat by not checking if $_.Enabled is $true, but just that it exists. You can get a count of the users using:

Get-CsAdUser -ResultSize Unlimited | Where-Object {$_.UserAccountControl -match "AccountDisabled" -and $_.Enabled} | Measure-Object

and, if you want, can disable them in one line using

Get-CsAdUser -ResultSize Unlimited | Where-Object {$_.UserAccountControl -match "AccountDisabled" -and $_.Enabled} | Disable-CsUser

Update 09-14-2012: Be careful using that last option if you’ve configured test accounts for synthetic testing using the New-CsHealthMonitoringConfiguration cmdlet as I mention in Lync Synthetic Tests: What They are and When They Don’t Work – Part I.

Update 04-12-2014: Replaced aliases with full cmdlet per best practices.

Update 09-19-2014: Added -ResultSize Unlimited

Changelog: Get-CsConnections.ps1

July 1st, 2011 8 comments

This is the changelog page for Get-CsConnections.ps1. You will find a complete list of released versions, their dates, and the features and issues addressed in each. Please refer to the script’s main page for more information including download links, installation details, and more.

v3.5 – 08-14-2019

  1. Added some cleanup for the VVX and Trio device agent strings. Thanks to @UcMadScientist. See

v3.4 – 03-27-2018

  1. Added more bugs to fix later. 🙂
  2. Fixed -SkipUpdateCheck. Thanks to Mike for pointing it out.
  3. Fixed issue where preferred connection order would not display for Skype for Business users when using -SipAddress option
  4. Minor tweaks per PsScriptAnalyzer and PSSharper
  5. Updated Remove-Variable function to v1.2
  6. Get-UpdateInfo updated function to v1.5
  7. Set-ModuleStatus updated function to v1.6
  8. Write-Log updated function to v3.2

v3.3 – 01-04-2017

  1. Now requires at least PowerShell 3.0
  2. minor code cleanup
  3. updated Get-UpdateInfo to 1.1

v3.2 – 11-17-2016

  1. Added new update routine
  2. Signed with new certificate

v3.1 – 04-07-2016

  1. added -SkipUpdateCheck to skip update check

v3.0 – 09-09-2015

  1. clarified some examples in the help section
  2. added detection for Skype for Business Server 2015

v2.9 – 10-28-2014

  1. Fixed an issue where PowerShell v2.0 machines would choke on one line. Thanks to Thierry for pointing it out.
  2. New code-signing certificate to replace expired cert

v2.8 – 06-10-2014

  1. Clarified ShowTotal output per Nate’s comment
  2. Fixed an issue where LRS clients would show a leading space for the agent string
  3. changed FE server info to be lower case to that it’s consistent
  4. the -pool parameter is now -PoolFqdn to align with other scripts and cmdlets
  5. fine tuned some of the code used when specifying -SipAddress

v2.7 – 05-24-2014

  1. fixed check for updates dialog border
  2. defined OverallRecords as an array to avoid an issue. Thanks to Tristan for that info.
  3. fixed verbose output not showing server names. Thanks to Greig for pointing it out.

v2.6 – 02-08-2014

  1. tweaked the MaxEndpointsPerUser section to always use the global configuration. This only matters in environments where multiple configurations exist (Get-CsRegistrarConfiguration). Thanks to Matt for pointing this out.
  2. swaped in new version of Set-ModuleStatus function
  3. cleanup of param block per best practices
  4. cleanup of comment help per best practices
  5. swaped in new verion of Test-ScriptUpdates

v2.5 – 11-26-2013

  1. tweaked SQL query for case insensitivity per Jean-Luc
  2. comment help updated to include info on Windows firewall config
  3. tweaked code when getting info for a single user to fix missing data for pool connection order

v2.4 – 09-13-2013

  1. Fixed output for unique users/clients
  2. Now validates if UserHighConnectionFlag is specified, and does not exceed MaxEndPointsPerUser

v2.3 – 08-01-2013

  1. intro code for script update check
  2. better pool version detection. When using the -Pool option, you no longer need to specify -Is2013 if it’s a 2013 pool
  3. Added code to restart script in an elevated session if the current session isn’t elevated (previously the script just threw an error and exited)

v2.2 – 05-10-2013

  1. Added support for Lync Server 2013 by using the -Is2013 switch. If I can find a better way of automatically detecting the version, I’ll incorporate that in a later build.
  2. Some code optimization
  3. Bug fix for an issue where the names of servers in a pool wouldn’t display if the script was run in PowerShell v3.

v2.1 – 12-13-2012

  1. Minor formatting tweaks for better handling long client names, such as the Lync RT client.
  2. Minor bug fixes

v2.0 – 10.16.2012

  1. Added -IncludeHighUsers option. Similar to -IncludeUsers, but only shows those users who meet the UserHighConnectionFlag value (shown in white), or exceeds it (shown in red).
  2. Added -ShowTotal option. When finished, shows statistics for the org, including total number of Lync enabled users, the total number of voice enabled users, and the percentage of enabled users that are currently connected.
  3. Updated the code the assembles FQDNs when just a pool or server netbios name are specified.
  4. If -SipAddress option is used, additional information showing the preferred connection order for the user is now also included. This adds the functionality of one liners: Finding out which Lync pool servers a user is associated with, and the preferred connection order.

v1.9 – 09-21-2012

  1. Finally resolved the issue where some front end servers would have a different number for PrimaryRegistrarClusterId in SQL Express than others, causing some servers to not return data (and not throw an error). Special thanks to Dave Howe @ Microsoft for helping me identify a work around, and also to Bart, a SQL Engineer at a client site who helped me tweak the related SQL query.
  2. A little code optimization
  3. -Server option added that now allows you to target a specific server instead of an entire pool.
  4. This version is code signed. You no longer are required to have a PowerShell Execution Policy of unrestricted or RemoteSigned. However, the script cannot be edited at all, or the code signature breaks.
  5. -SipAddr now supports specifying just the left part of the SIP address, but only in organizations with ONE SIP domain. For example, -SipAddr bill.gates instead of -SipAddr
  6. -Server supports specifying the netbios domain. The script will “guess” at the FQDN by using the domain name of the machine the script is running on and appending it to the netbios name.

v1.8 – 09-14-2012

  1. Tons of formatting changes, mostly subtle
    1. Server names in the pool list are sorted
    2. Server names in the ‘Frontend Server’ list are now sorted
    3. Connections are now sorted by client
  2. Added -ShowFullClient switch to show extended client info.
  3. If -pool is not specified, and only one registrar pool exists, the script will automatically use that pool.
  4. Some additional verbose output added for troubleshooting

v1.7 – 09-07-2012

  1. Minor display sorting cleanup
  2. Streamlined some code
  3. Removed -IncludeUsers from automatically being set when using -ClientVersion

v1.6 – 07-02-2012

  1. Added feature to show just specific client versions and the connected users with that client

v1.4 – 04-19-2012

  1. cleaned up some of the param() block and added some validation
  2. streamlined some of the code
  3. tweaked the displayed results a little to better handle longer agent strings

v1.3 – 12-27-2011

  1. tweaked the formatting a little to account for longer agent strings due to mobile clients
  2. ignore the RtcApplication-[guid] account when calculating users and displaying userlist
  3. added error if pool doesn’t have any servers
  4. added UserHighConnectionFlag in parameter block to support pipeline entry

v1.1 – 08-09-2011

  1. added comment based help
  2. added option to display user list
  3. updated formatting
  4. added code so it will run in a normal PowerShell session

v1.0 – 07-01-2011

  1. original version

Changelog: Set-Lync2010Features.ps1

November 27th, 2009 No comments

This is the changelog page for Set-Lync2010Features.ps1. You will find a complete list of released versions, their dates, and the features and issues addressed in each. Please refer to the script’s main page for more information including download links, installation details, and more.

v5.3 – 12-23-2011

  1. Added requirements for Front End and Director servers to support Mobility. This includes the Dynamic Compression Windows 2008 feature.

v5.2 – 08-17-2011

  1. Added option (& related Get-Webpage function) to download trial version of Lync (just opens a browser to the site)
  2. Added option to restrict feature availability to Standard CAL

v5.1 – 07-26-2011

  1. Detect if Lync is installed before installing some utilities and tools
  2. DSR loopback adapter option added
  3. Lync Server Updates option was updated to represent the 07-25-2011 release per KB 2493736
  4. Menu was split into pre/post install tasks, with post install tasks only visible if Lync Server is detected on the box

v5.0 – 07-25-2011

  1. added “Find Lync Versions” and related .Net 4 installer
  2. added functions for creating shortcuts and unzipping files
  3. added function for “Windows Media Format Runtime” (per
  4. some variable cleanup
  5. some error checking
  6. added function to run installation routines. This makes it easier to do consistent screen output (menu)
  7. cleaned up variable removal when exiting
  8. Installation of Silverlight
  9. Updated installation of Visual C++ Redistributable to latest version (per MS11-025)
  10. added option to enable federation with Office365

v4.2 – 05-26-2011

  1. updated function to allow downloading files to different folders and different names
  2. added OWA / Lync integration feature

v4.1 – 05-01-2011

  1. added group membership check (checks for local admin, CSAdmin* and RTCUniv* only)
  2. added 04-20-2011 “Lync Server update download”
  3. added chm file download and install & shortcut
  4. added standalone AV server prereq option
  5. added PowerShell transcript
  6. added backup current config

v4.0 – 04-06-2011

  1. added Visual C++ option
  2. added Stress and Performance Tool
  3. added Disable IPv6
  4. added “IM an Expert”
  5. added Windows Update
  6. lots of code cleanup

v3.0 Р02-2011 by St̴le Hansen (

v1.0 – 11/27/2009

  1. initial version