开发者

DirectorySearcher null comparison in filters

开发者 https://www.devze.com 2022-12-20 04:46 出处:网络
I am trying to find LDAP objects which don\'t 开发者_高级运维have any value in their \"manager\" property. What should be the filter string? I am trying with this to no avail:

I am trying to find LDAP objects which don't 开发者_高级运维have any value in their "manager" property. What should be the filter string? I am trying with this to no avail:

"(&(objectClass=user)(objectCategory=person)(manager=NULL))"


Try this:

(&(objectClass=user)(objectCategory=person)(!(manager=*)))

! is the "not" operator and * is the LDAP wildcard so the above will do a search for any entry that doesn't have a value set for the manager-attribute.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号