Lync 2013: Setting a user picture for an Application or Response Group Contact Object
I tested this on a while homed on a 2013 pool and with the 2013 client. It doesn’t seem to work with the 2010 client in my testing. It is in no way supported, I just thought it might work, use at your own risk. It also seems to be fairly intermittent as to whether the pictures will appear or not in the client – if anyone has an ideas on this/tries this I’m interested to hear how you get on.
You will need the Lync and Active Directory PowerShell modules available (or a remote session with them available)
Normally in a Lync install Each “Application Endpoint”, or “bot” as we often call them (but also applies to response groups, audio test service etc.) has a contact object with no photo, for example take our (Modality Systems) TimePrompt application. This is how it would normally look
Each Bot or Response Group Creates an AD contact object in the Configuration Partition. We can confirm the AD contact object details with Get-CSApplicationEndPoint. You don’t actually need to do this but it helps you understand how it works.
These contact objects are not in the AD Default naming context, they are actually held in the configuration partition (similar to the core Lync apps e.g. http://lyncdup.com/2011/07/lync-troubleshooting-audio-test-service-csaudiotestserviceapplication-will-not-start/ ), You can see this in the Identity string where is says “CN=Configuration”
By default Get/Set-ADObject will not find them. To get to them with Set-ADObject we need to change the Search Base
$sb=”CN=Configuration,DC=domain,dc=com”
(substitute domain for your domain and com for your domain suffix, as per Identity in Get-CSApplicationEndPoint)
Now we can Get that AD Object
Get-ADObject -searchbase $sb -Filter ‘displayname -like “TimePrompt*”‘
You should get one result (if not check your display name is matched correctly/is unique enough)
Format it into a list to see it better
Get-ADObject -searchbase $sb -Filter ‘displayname -like “TimePrompt*”‘ | FL
Now we can upload a photo into a temporary variable and add it to that contact object (ensure your photo is 96×96 and less than 10k).
$photo = [byte[]](Get-Content C:\temp\robot96x96.jpg -Encoding byte)
Then we can Pipe out Get-ADObject to Set-ADObject and add the photo to the thumbnailPhoto attribute
Get-ADObject -searchbase $sb -Filter ‘displayname -like “Timeprompt*”‘ | Set-ADObject -Add @{thumbnailPhoto=$photo}
We can verify the thumnailPhoto attribute is now set in ADSI edit by connecting to the Configuration context
Once the Lync address book is updated (Update-CSAddressBook) and the Lync client has sync’d the new address book, you should see the picture on the application or response group (it can take some time to sync out, the wind must be blowing in the right direction).
It doesn’t appear in 2010 client
But does in 2013










