R
Robert Barnett
I having trouble querying for users that have changed, when I have a node that have over 750 users. It takes way to long over 1 hour, if it does return users. How can I improve this?
objADSDirEntry = New DirectoryEntry(sInADSADsPath, strADSUserName, strADSPassword, AuthenticationTypes.ServerBind)
ObjADSDirSearcher = New DirectoryServices.DirectorySearcher(objADSDirEntry)
Err.Clear()
ObjADSDirSearcher.Filter = "(&(|(objectClass=user)(objectClass=group)(objectClass=contact))(&(uSNChanged>=" & LastMod & ")(uSNChanged<=" & NewLastMod & ")))"
'ObjADSDirSearcher.PageSize = 1000
ObjADSDirSearcher.ServerTimeLimit = TimeSpan.FromMinutes(3)
For Each objSearchResult In ObjADSDirSearcher.FindAll
objadsDirEntry2 = objSearchResult.GetDirectoryEntry
Thanks
Robert
objADSDirEntry = New DirectoryEntry(sInADSADsPath, strADSUserName, strADSPassword, AuthenticationTypes.ServerBind)
ObjADSDirSearcher = New DirectoryServices.DirectorySearcher(objADSDirEntry)
Err.Clear()
ObjADSDirSearcher.Filter = "(&(|(objectClass=user)(objectClass=group)(objectClass=contact))(&(uSNChanged>=" & LastMod & ")(uSNChanged<=" & NewLastMod & ")))"
'ObjADSDirSearcher.PageSize = 1000
ObjADSDirSearcher.ServerTimeLimit = TimeSpan.FromMinutes(3)
For Each objSearchResult In ObjADSDirSearcher.FindAll
objadsDirEntry2 = objSearchResult.GetDirectoryEntry
Thanks
Robert