December 31 2010

Adding photos in Lync 2010

There are a number of ways for users to have photos in Lync 2010 but my preference is to store them in Active Directory because they can then be reused by Sharepoint, Exchange / Outlook and other applications.

This is a quick post about the easiest and cheapest way I have found to do this. I’m assuming that you already have your user photos.

Firstly, obtain and install Picture Resizer from here. I used the following options “-o -f96x96 -q100”. This meant that I can easily right-click on a user photo and have it resized to 96 x 96 while maintaining photo quality. This still results in image size reduction, which we are aiming to have well under 30KB to avoid bloating the AD database.

Right-click resize to 96 x 96
Right-click resize to 96 x 96

Next, install a piece of software by a guy named OliD that extends the Active Directory Users and Computers MMC with two tabs on the user properties page – from here. Read the installation instructions can be found in the .zip file.

Once installed you will have a Photo tab in ADUC. Select your newly resized photos and add them to to the thumbnail section.

Photo tab
Photo tab

More useful info here and here.

I use a maximum of one Google Ad per post to help offset some of my blog hosting costs.


December 30 2010

Scheduled task Powershell script to backup Lync Server 2010 config

I’ve created a simple Powershell script to run daily to backup Lync configuration with the export-csconfiguration command:

cd $env:UserProfile
Import-Module 'C:Program FilesCommon FilesMicrosoft Lync Server 2010ModulesLyncLync.psd1'
$filename = "d:backup{}" -f (Get-Date)
export-csconfiguration -Filename $filename -Force:$True

For example, put the above code into a document called d:backupbackup.ps1 and then create a scheduled task to execute the command on a daily basis:

powershell -command d:Backupbackup.ps1

This can run in the SYSTEM context. Simples!

December 15 2010

Find out how many users are connected in Lync Server 2010

In OCS it was really simple to see how many OCS clients / users were connected to the pool and the version numbers of each client as well as the total number of enabled users.

To get the number of clients connected in Lync 2010, you need to do it via performance counters on the SQL server. Look at the SQLServer:User Settable performance counters for the backend SQL instance and add ‘user counter 1’ – this has the number of currently connected users.

To find the total number of Lync enabled users, use the “Get-CsUser -Filter {Enabled -eq $true} | Measure” Powershell cmdlet.

This seems to be another one of those things that was so easy in OCS but seems so much more difficult in Lync.

December 10 2010

Enable all users in an OU for Lync with Powershell

I much prefer the old OCS way of enabling users for OCS / Lync, I believe it was much easier, but it looks like we are going to have to get used to using Powershell to do this. An example I have put together to enabling all users in an Organisational Unit for Lync 2010 is:

get-csADuser -OU "OU=Users,OU=Head Office,dc=danovich,dc=com,dc=au" | Enable-CsUser -RegistrarPool -SipAddressType emailaddress

More reading here:


December 9 2010

Add SRV record for Lync to Unix BIND DNS

Recently I need to add the _sipinternaltls SRV record for Lync to a DNS server running BIND on Unix (same process for _sipexternaltls). After reading through this article – – I found that it wasn’t too hard – just needed to add the following line to the db.zonename file: SRV 0 0 5061

In my case I pointed the SRV record to an A record – that had the IP address of the internal Lync pool. I did it this way because otherwise you will get an error on your Lync client stating Lync cannot verify that the server is trusted for your sign-in address. Connect anyway?. More about this error here –

Don’t forget to restart BIND so it reloads your DB file.