Ilse Van Criekinge's Weblog

Addicted to Microsoft Unified Communications

Bulk import pictures

Bulk import pictures

  • Comments 2
  • Likes

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


Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment