0 votes

This is the query I am using (basically if "Photo" is empty):

(&(sAMAccountType=805306368)(!(photo=*))) which returns everyone in AD, not just users without photos.

I used the one below to return users without a manager and it worked perfectly:


What am I doing wrong? Can my query be fixed?

by (90 points)

1 Answer

0 votes
by (18k points)
selected by
Best answer


User photos are stored in the thumbnailPhoto property. Try this one:


Perfect! Thank you.

Related questions

0 votes
1 answer

Hello, we manage 20 Domains with Adaxes. How can we create a Business Unit that holds all objects within OU's /Builtin and Users of all managed Domains without adding each OU seperately? regards Helmut

asked Jan 21, 2021 by a423385 (510 points)
0 votes
1 answer

What would be the best way to create a Business Unit for all users in a domain that have Office 365 licenses assigned to them? I can do it with powershell but I would like to have the Info as a Business Unit and I don't want to re-invent the wheel. Thanks, Tim

asked Jun 20, 2017 by timskag (150 points)
0 votes
0 answers

Here's a strange one for you all. Some of our users are getting created with Activesync enabled, and some are getting created with it disabled. Both creations are done ... help to point me in the right direction would be greatly appreciated. Thanks in advance!

asked Nov 29, 2013 by EgotisticalGiraffe (350 points)
0 votes
1 answer

Hi, I would like to launch a script to optimize photo to 96x96 when photo is updated. I use a command line to do the job but i can figure out how to get the photo ... Any chance Adaxes stores the photo in a temp folder before it loads it to AD ? Thanks Stephen

asked Nov 2, 2011 by sroux (800 points)
0 votes
1 answer

I'm using this report as a baseline and I have it mostly working, but I need assistance setting the ldap filter or search base to include only specified OUs instead ... Without Pictures", $NULL, $htmlBuilder.ToString()) } finally { $searchResult.Dispose() }

asked Oct 28, 2015 by yourpp (530 points)
2,733 questions
2,469 answers
1,336,408 users