kj299 / PSldap

Powershell Script to query current AD via ldap filter
0 stars 0 forks source link

reduce roundtrips to server for efficiency #3

Closed kj299 closed 1 year ago

kj299 commented 1 year ago

The code could be made more efficient by using the PageSize and PagedResults properties of the DirectorySearcher object.

The PageSize property specifies the number of objects returned in a single page of results while the PagedResults property specifies the number of objects returned in a single search request. Using these properties can help you optimize your code by reducing the number of round trips to the server and the amount of data transferred between the client and server.