Add Pictures to Active Directory for Outlook Contacts

What I'm trying to do here without wasting too much time is we want our company to have all the associate photos as their contact pictures in Outlook. I know Outlook 2007 and Outlook 2010 have a lot of places now where contact pictures appear, if one is selected. So instead of having all the grey boxes to add a picture, we want to just add photos for everyone.

Here's what I understand -- We are running Exchange 2010, and from what I understand, each time a new user is created, it adds that user to the global contacts list, and then pushes that out to Outlook, correct? Also, with individual contacts added on each machine under the Contacts tab in Outlook, you can add all the user info and add a picture whereas the global contact list pulls straight from Active Directory. But, there is no where to add a picture in active directory for each user. Using google I found this which writes a script that uploads a 10K .jpeg photo to each active directory user, based on user name. Obviously that isn't the easiest way to do it.

Does anyone know of ANY way that would accomplish what I'm trying to do? If AD doesn't support photos, no biggie. I would just like to add these pics.

I was thinking maybe create a contact group of all the associates with the correct info and photos, and then import that to each machine. But I'm sure someone knows a better/easier way.


Solution 1:

The thumbnailPhoto attribute on each user object is where you want to store this information; you can import it with the Import-RecipientDataProperty powershell cmdlet. Microsoft's example:

Import-RecipientDataProperty -Identity Ayla -Picture -FileData ([Byte[]]$(Get-Content -Path "M:\Employee Photos\AylaKol.jpg" -Encoding Byte -ReadCount 0))

The cmdlet will only upload a photo of 10KB or smaller (though the schema attribute has a rangeUpper of 100KB, so that ought the be the actual limit), so you'll probably need to normalize the images to fit that limit first.