从公元返回的成员的Python win32com.adsi模块的限制数量 [英] Python win32com.adsi module limits number of returned members from AD

查看:306
本文介绍了从公元返回的成员的Python win32com.adsi模块的限制数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用下面的code ...

Using the following code...

import win32com.adsi

DNC=win32com.adsi.ADsGetObject('LDAP://rootDSE').Get('DefaultNamingContext')
path = 'LDAP://cn=BIG_GROUP,ou=Groups,'+DNC
groupobj = win32com.adsi.ADsGetObject(path)
users = groupobj.member
print len(users)

输出始终最大为1500,即使BIG_GROUP包含几千件。我怎样才能在返回BIG_GROUP的所有成员的方式执行此查询?

The output is always a maximum 1500, even if BIG_GROUP contains several thousand members. How can I execute this query in a way that returns all members of BIG_GROUP?

推荐答案

AD返回n个结果从一个大的属性(如成员),其中N是最大范围检索大小的时候。目录支持一种叫做远程检索,您可以获取每个卖到1500值的分组。
您应该使用对目录中的远程检索控制。我不知道,如果您的LDAP API支持这一点,但该文档应该回答。

AD returns N results at a time from a large attribute (like member), where N is the max range retrieval size. The directory supports something called ranged retrieval where you can fetch groupings of up to 1500 values per fetch.
You should use the ranged retrieval control against the directory. I don't know if your LDAP API supports this but the docs should answer.

下面是更多的信息的方式了一下,从的 MSFT文档

Here is a bit more in the way of info, from the MSFT docs

这篇关于从公元返回的成员的Python win32com.adsi模块的限制数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆