How to Import Images into Active Directory

  • Buffer
  • Buffer

In this guide, I will show you how you can import images to Active Directory that your users Outlook clients will show in an Exchange and MS Lync environment making it all more interesting.

In big organizations where new employees are hired all the times, it can be a big help using face pictures in Outlook and Lync clients to make it easier when communicating with colleges that maybe are not even working in the same building or even the same country. The solution I will show you below are using the thumbnailPhoto attribute introduced in Active Directory back in Windows 2000. I will show you how you can import an image to each user in active directory to make it easier to recognize colleges in Outlook and Lync. Be aware that the images will have to be in jpg format and that the file size not can exceed 10 kb.

First we will make sure that the data are replicated to all global catalog servers

1. Execute the command: “Regsvr32 schmmgmt.dll” from a command prompt.

regsrv32

2. Open an MMC console (mmc.exe) and add the Active Directory Schema snap-in to the console.

3. In the Active Directory Schema snap-in, expand the Attributes node, and then locate the thumbnailPhoto attribute.

mmc

4. In the Properties page, select “Replicate this attribute to the Global Catalog“, and click OK

ThumbnailPhoto_properties

Replication might already be select. Otherwise, select it and click OK.

Import image using PowerShell cmdlet

You can use the script example below to import a picture for each user to Active Directory.

Import-RecipientDataProperty -Identity "Thomas Nielsen" -Picture -FileData ([Byte[]]$(Get-Content -Path "C:\pics\thomas.jpg" -Encoding Byte -ReadCount 0))
Import-RecipientData

Import images to AD using AD Photo Edit

If you are not too experienced with PowerShell and scripting you can use a freeware program called AD Photo Edit to upload your photos for each user in Active Directory instead. Just install the program, Search for the user you want to assign a photo and follow the instructions. Adding images to Active Directory is very easy with this little tool.

AD Photo Edit-2

I hope you found this post useful and you are very welcome to drop me a comment below of you have any questions.


avatar

About Thomas

I am an IT Professional that has this blog as a hobby project in my spare time. I have been in the IT business since 1996 and want to share some of the thing I have picked up over the years with people who visit this blog... Connect with me on: Twitter | Google+ | YouTube Subscribe to my Newsletter