Bulk import pictures

A few months ago I posted a procedure on how one can import pictures into Active Directory by using the Exchange Management Shell cmdlet Import-RecipientDataProperty, here:

Upload picture in Outlook 2010 using the Exchange Management Shell (Exchange 2010)

As a follow-up, I would like to show you a way to do this in bulk…(small note: there are other ways, this is just one!)

Setting the scene

I’ve got a bunch of users in my demo environment without a picture yet…


To get going, you need a list of mailbox-enabled users, a picture, and a file that links the user to its picture like the comma-delimited file I’m using here…

In my example I will use the same picture for every user


Populate AD

Running the following single line, will populate Active Directory for every user found in that csv file, using the picture listed next to it.

Import-csv c:\userkes.csv | % { Import-RecipientDataProperty –Identity $_.username –Picture –FileData ([Byte[]]$(Get-Content –Path $_.picture –Encoding Byte –ReadCount 0)) }


Checking the results

Using AdsiEdit….


And using Outlook 2010…


The power of the Shell 🙂


Comments (6)

  1. Chris128 says:

    If anyone wants an easy to use GUI program for doing this rather than having to use command line tools, I'm currently making one (it will be free).

    You can find more info (and a download link once it is complete) on my blog here: cjwdev.wordpress.com/…/ad-photo-edit-a-program-for-uploading-images-into-the-active-directory-thumbnailphoto-attribute-used-by-outlook-2010

  2. The CodeTwo GUI works well, however a limitation is that you cannot import in bulk ONE PICTURE to multiple users without first spending lots of time preparing the JPG filenames.

  3. Eugene says:

    Did the CSV exactly as baove and even the filenames are the same but get an error- Exch 2010 SP3:
    "Get-Content : Cannot bind argument to parameter ‘Path’ because it is an empty string."

  4. Anonymous says:

    Today, I came across a question – How to update photos in bulk in Office 365 In Cloud users

    When first

  5. show box says:

    Thanks for the great info. I really loved this. I would like to apprentice at the same time as you amend your web site, how could i subscribe for a blog site?
    For more info on showbox please refer below sites:
    Latest version of Showbox App download for all android smart phones and tablets.
    http://movieboxappdownloads.com/ – It’s just 2 MB file you can easily get it on your android device without much trouble. Showbox app was well designed application for android to watch movies and TV shows, Cartoons and many more such things on your smartphone.
    For showbox on iOS (iPhone/iPad), please read below articles:
    Showbox for PC articles:
    There are countless for PC clients as it is essentially easy to understand, simple to introduce, gives continuous administration, effectively reasonable. it is accessible at completely free of expense i.e., there will be no establishment charges and after establishment
    it doesn’t charge cash for watching films and recordings.
    http://www.showboxforipad.org/showbox-apk/ Not simply watching, it likewise offers alternative to download recordings and motion pictures. The accompanying are the strides that are to be taken after to introduce Showbox application on Android. The above
    all else thing to be done is, go to the Security Settings on your Android telephone, Scroll down and tap on ‘Obscure sources’.
    Movie Box, an esteemed movies application in which you can find stacks of programs and films. The guide is given here to download Movie Box app to Android and to Apple iOS 9.0.2, iOS 8.4/8.3 and also for the lower versions without Jailbreak.
    Please do login to Showbox application with the help of Ymail. You can login in Ymail from here –
    Sign Up & Do registration for latest movies on Showbox application

Skip to main content