• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

Import Images into the Active Directory

Slipstick Systems

› Exchange Server › Cmdlets › Import Images into the Active Directory

Last reviewed on December 4, 2018     12 Comments

Applies to: Exchange 2010, Exchange 2013, Exchange 2016, Office 365 Exchange

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.
Contact photo in GAL

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}

 

Tools

AD Photo Edit

AD Photo Edit is a user friendly (and free) program for adding, removing and editing these images.If you are using Outlook 2010 then you have probably noticed the ability for Outlook to display an image/photo for each user or contact in your Active Directory domain. However, the only method that MS provide you with for actually importing images into the AD attribute that Outlook 2010 pulls these images from is a powershell cmdlet that comes with Exchange 2010. This cmdlet also limits you to selecting images that are less than 10 KB even though the thumbnailPhoto attribute in AD is only limited to 100 KB.

CodeTwo Active Directory Photos

CodeTwo Active Directory Photos will let you upload photographs to Active Directory and manage them easily using a light and intuitive user interface. This freeware application has been designed to make managing scores of users' images straightforward and fast.

More Information

Import-RecipientDataProperty (TechNet)
Set-UserPhoto (TechNet)
Batch Import Photos into Outlook Contacts

Import Images into the Active Directory was last modified: December 4th, 2018 by Diane Poremsky

Related Posts:

  • Outlook.com Contact Photos
  • Export (Save) Outlook Contact Photos
  • Meeting Organizer's Name Appears in the Subject line
  • Office 365 Exchange: Remove-CalendarEvents

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Subscribe
Notify of
12 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

paul.parrish@dbcf.ms.gov
July 14, 2015 10:30 am

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.

0
0
Reply
Diane Poremsky
Author
Reply to  paul.parrish@dbcf.ms.gov
July 14, 2015 2:08 pm

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).

0
0
Reply
paul.parrish@dbcf.ms.gov
July 9, 2015 4:07 pm

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.

0
0
Reply
Diane Poremsky
Author
Reply to  paul.parrish@dbcf.ms.gov
July 13, 2015 12:38 am

Are the pictures in Outlook Contacts or associated with the GAL entries? You have a hybrid setup? Are you syncing the AD?

0
0
Reply
Olivier CATTEAU
March 31, 2015 4:53 am

Hi, is there a way to import current user photo to Exchange, by using VBA ?

0
0
Reply
Diane Poremsky
Author
Reply to  Olivier CATTEAU
March 31, 2015 8:24 am

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.

0
0
Reply
d
April 30, 2014 12:30 pm

Import-Csv I:\Import\import.csv |%{Set-UserPhoto -Identity $_.Identity -PictureData ([System.IO.File]::ReadAllBytes($_.PictureData))} -Confirm:$false

0
0
Reply
Joe Ashley
February 4, 2014 9:04 am

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.

0
0
Reply
Diane Poremsky
Reply to  Joe Ashley
February 7, 2014 1:38 am

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.

0
0
Reply
Pouria Molavi (@Paganmoon)
January 14, 2014 7:23 am

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?

0
0
Reply
Diane Poremsky
Reply to  Pouria Molavi (@Paganmoon)
January 15, 2014 1:12 am

You need to remove the picture before you can import a new one - the pictures don't replace existing photos.

0
0
Reply
ATL Exch Guy
January 9, 2013 12:54 pm

Diane, I would just like to take a moment to thank you for the post. It was exactly what I was seeking!

0
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 30 Issue 34

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Use Classic Outlook, not New Outlook
  • Mail Templates in Outlook for Windows (and Web)
  • How to Remove the Primary Account from Outlook
  • Reset the New Outlook Profile
  • Disable "Always ask before opening" Dialog
  • Adjusting Outlook's Zoom Setting in Email
  • This operation has been cancelled due to restrictions
  • How to Hide or Delete Outlook's Default Folders
  • Change Outlook's Programmatic Access Options
  • Shared Mailboxes and the Default 'Send From' Account
  • Opt out of Microsoft 365 Companion Apps
  • Mail Templates in Outlook for Windows (and Web)
  • Urban legend: Microsoft Deletes Old Outlook.com Messages
  • Buttons in the New Message Notifications
  • Move Deleted Items to Another Folder Automatically
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • Google Workspace and Outlook with POP Mail
  • Import EML Files into New Outlook
  • Opening PST files in New Outlook
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Opt out of Microsoft 365 Companion Apps

Mail Templates in Outlook for Windows (and Web)

Urban legend: Microsoft Deletes Old Outlook.com Messages

Buttons in the New Message Notifications

Move Deleted Items to Another Folder Automatically

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Google Workspace and Outlook with POP Mail

Import EML Files into New Outlook

Opening PST files in New Outlook

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2025 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

:wpds_smile::wpds_grin::wpds_wink::wpds_mrgreen::wpds_neutral::wpds_twisted::wpds_arrow::wpds_shock::wpds_unamused::wpds_cool::wpds_evil::wpds_oops::wpds_razz::wpds_roll::wpds_cry::wpds_eek::wpds_lol::wpds_mad::wpds_sad::wpds_exclamation::wpds_question::wpds_idea::wpds_hmm::wpds_beg::wpds_whew::wpds_chuckle::wpds_silly::wpds_envy::wpds_shutmouth:
wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment