Outlook isn't alone in supporting photos, in fact, the Active Directory has supported pictures for years, using the Picture attribute (thumbnailPhoto) to store thumbnail photos, and in Exchange 2010 and on-premises Exchange 2013, Import-RecipientDataProperty cmdlet makes it easy to import photos.
If you don't want to use PowerShell command lines, there are several tools available that give you a GUI to work with.
The photos should be under 10K in size and re-sized to approximately 100x100 pixels. While the thumbnailPhoto property can support up to 100K files, the RecipientDataProperty cmdlet can only import up to 10K. Generally speaking, because the GAL can only display small thumbnails, the images can be reduced to about 3K and still look good.
The OWA Address book will display the images almost immediately but it can take up to 24 hours for the images to show up in the GAL in Outlook.
To import a single contact, the cmdlet will look like this:
Import-RecipientDataProperty -Identity "full name" -Picture -FileData ([Byte[]]$(Get-Content -Path "C:\photos\firstlast.jpg" -Encoding Byte -ReadCount 0))
You can bulk import using a list in a CSV or text file.
In addition, you can use Import-RecipientDataProperty to import audio files for name pronunciation.
Import-RecipientDataProperty -Identity maryc -SpokenName -FileData ([Byte[]]$(Get-Content -Path "C:\AudioFiles\maryc.wma" -Encoding Byte -ReadCount 0))
Office 365 Exchange
To import contact photos into Office365 (or Exchange 2013), you need to use the Set-UserPhoto cmdlet to upload and then save the photo.
Set-UserPhoto "First Last" -PictureData ([System.IO.File]::ReadAllBytes("c:\photos\firstlast.jpg"))
After importing the photos, you need to use this cmdlet to save the photo with the contact.
Set-UserPhoto "First Last" -Save
To remove a photo from a user account, use the Remove-UserPhoto cmdlet:
Remove-UserPhoto "First Last"
Note: you can use email address, alias, or first last (full name) as the username.
It will take up to 24 hours for the images to show up in the GAL in Outlook. The OWA Address book will display the images almost immediately.
Bulk import
To bulk import photos, you need a CSV file with the username and photos:
Identity, PictureData
EMO, I:\Import\emo.png
sue@cdolive.com, I:\Import\sue.jpg
kens, I:\Import\kens.png
And the Set-UserPhoto cmdlet to upload and save the photos:
Import-Csv I:\Import\import.csv |%{Set-UserPhoto -Identity $_.Identity -PictureData ([System.IO.File]::ReadAllBytes($_.PictureData))} Import-Csv I:\Import\import.csv |%{Set-UserPhoto -Identity $_.Identity -Save}
To remove contact photos, use the Remove-UserPhoto cmdlet:
Import-Csv I:\Import\import.csv |%{Remove-UserPhoto -Identity $_.Identity}
More Information
Import-RecipientDataProperty (TechNet)
Set-UserPhoto (TechNet)
Batch Import Photos into Outlook Contacts
Yes, I used powershell to upload each user picture (i have 70 users). Now I am rolling out 50 new laptops with Win 8.1. Pictures are in Lync (Skype) and Outlook. But I get the "grey", empty person on the Login Screen (to the domain). I can manually change each picture with no problem but was hoping it would just "get" the picture from the user account after logging into the domain the first time. Thanks.
I'm looking into it - but I think the computer's user account photo needs to be set on the computer. (I see the same with Windows 10 logging into Azure AD).
All my pictures are already in Outlook (premise) and Lync 365. I want them also in AD. Is there an easy fix or do I have to reload. I used powershell to get all my pics in exchange.
Are the pictures in Outlook Contacts or associated with the GAL entries? You have a hybrid setup? Are you syncing the AD?
Hi, is there a way to import current user photo to Exchange, by using VBA ?
I'm not aware of any VBA that can do it. You write it to the AD using PowerShell, which could be triggered using VBA, but you still need to have PowerShell access and using VBA to call the PowerShell just adds another layer of complexity.
Import-Csv I:\Import\import.csv |%{Set-UserPhoto -Identity $_.Identity -PictureData ([System.IO.File]::ReadAllBytes($_.PictureData))} -Confirm:$false
I've been using PS as an admin for a long time for on-premises installs. O365 is different :) When I use your suggestion for O365 it all works until I go to do -Save. PS tells me this "No photo with class 'IPM.UserPhoto.Preview' exists" and the user's Lync photo goes blank. Please help. I need to do a bulk update.
Is the image viewable in OWA? It's my understanding that the error is a bug in Exchange - the bug is that Exchange kicks up the error, everything works as expected. It can take up to 24 hours for the change to sync to Lync and Outlook but should be present in OWA immediately.
We've used Import-RecipientDataProperty (with a script) to import pictures so they're available in the GAL and viewable in Outlook and Lync, though it seems the Import-RecipientDataProperty cmdlet doesn't do anything if there's already a picture imported. Is there anyway to easily update the picture property?
You need to remove the picture before you can import a new one - the pictures don't replace existing photos.
Diane, I would just like to take a moment to thank you for the post. It was exactly what I was seeking!