Update Thumbnail Photo in ADDS

 If you have the requirement to update a thumbnail photo in AD or Active Directory then you cannot natively upload using the MMC however what you can do is use these commands:

$ADphoto = [byte[]](Get-Content <path to file> -Encoding byte)
Set-ADUser<username> -Replace @{thumbnailPhoto=$ADphoto}

This is an example of an actual user for the point of this blog:

$ADphoto = [byte[]](Get-Content "c:\temp\imgage.PNG" -Encoding byte)
Set-ADUser photo.bear@bear.local -Replace @{thumbnailPhoto=$ADphoto}

The attribute will look like this: 



The attribute value should go from this:



To this, if you notice this attribute is empty then the command as not run correctly, also remember to wait for ADDS replication...


The command above uploads the bytes to AD under the attribute thumbnailPhoto which is a hexadecimal attribute, you will notice that if you have "show only attributes that have values" selected this will not be visible until you actually have a photo in ADDS.





Previous Post Next Post

Ω†Ω…ΩˆΨ°Ψ¬ Ψ§Ω„Ψ§ΨͺΨ΅Ψ§Ω„