Upload picture in Outlook 2010 using the Exchange Management Shell (Exchange 2010)
While prepping for one of my sessions @ TechEd Berlin on managing and administering Exchange 2010, I was looking for a demo to illustrate the changes introduced with Remote Powershell when importing and exporting files. That's when I stumbled into the Exchange Management Shell cmdlet Import-RecipientDataProperty, which is described in the following TechNet article: Import-RecipientDataProperty.
So here are the steps to get a picture uploaded into Active Directory, in this example my user Ilse doesn't have a picture yet
Step 1. Get a picture
You need a JPEG file, limited in size to 10 kilobytes!
Step 2. Run the Exchange Management Shell cmdlet Import-RecipientDataProperty
Run the Exchange Management Shell cmdlet to upload the picture. Running it will populate Active Directory with the picture, more specifically the attribute called thumbnailPhoto will be populated. Make sure this attribute is replicated to the Global Catalog (big thank you to Astrid for helping me out with this one :-)) .
Before running the cmdlet, the attribute doesn't have a value:
Check if the attribute is replicated to the Global Catalog, by using for example the Schema Snap-In:
Run the following cmdlet:
- there is no need to refer to a UNC path, you can locate the file anywhere
- remember the limit of 10KB!!
After running this, Active Directory will be populated:
And after restarting Outlook, the picture will be there :-)
Follow-up: If you want to know if this will work with Exchange 2003-Exchange 2007, click this link: