A simple Powershell script to import photos from a directory into AD. The photos should be named with the format “samAccountName.jpg”, less than 10k in size, and recommended dimensions of 96×96.

To get the photos into the proper format, I used imageMagick’s “mogrify” command.

mogrify -path OUTPUT_PATH -format jpg -thumbnail 96x96 *.jpg

Embedded github “Gist”:


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.