Add a picture to AD user

Hello everyone,

In this tutorial, I want to show you how can we attach a picture to users on your domain.
I am going to do that using Powershell, but today there are some third party tools which allow you to do using GUI.

Before we are starting we have to check something in our Schema,

Open Run and enable schema dll using the following regsrv

Regsvr32 schmmgmt.dll : add picture user Open MMC console and add “Active Directory Schema“: add picture user Search “thumbnailPhoto” attribute and double-click on it: add picture user

Here we have to make sure that the “Replicate this attribute to the Global Catalog is checked”, as you can realize that this attribute going to replicate to all rest DC’s

Add picture user

And now we need to add the picture to a user in this way:
The picture size should be 10K

Import-RecipientDataProperty -Identity "PELEGIT" -Picture -FileData ([Byte[]] $(Get-Content -Path "C:\Pelegit.jpg" -Encoding Byte -ReadCount 0))
attach_Picture to User
Here is my picture :
Picture to User _AD


About Meir Peleg 337 Articles
My name is Meir Peleg, (Born 30/04/1991) live in ISRAEL. Live and breath IT world. Microsoft MVP Windows IT & VMware vExpert.