![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | get-adobject hi, while I use the get-adobject cmdlet to get users I found the answer is limited to 1000. How should I avoid this limitation ? Thanks |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: get-adobject See thread "get-adobject only returns 1000 objects" from March 15th. "Did" <didi10000@walla.co.il> wrote in message news:1174205403.295784.103200@n76g2000hsh.googlegroups.com... > hi, > while I use the get-adobject cmdlet to get users I found the answer is > limited to 1000. > How should I avoid this limitation ? > > Thanks > |
My System Specs![]() |
| | #3 (permalink) |
| Guest | RE: get-adobject Its related to the max page size setting in AD which limits the number of results returned see this thread http://www.microsoft.com/communities...6-a875aebfc67f -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk "Did" wrote: > hi, > while I use the get-adobject cmdlet to get users I found the answer is > limited to 1000. > How should I avoid this limitation ? > > Thanks > > |
My System Specs![]() |
| | #4 (permalink) |
| Guest | RE: get-adobject As a workaround, you can increse the pagesize returned by the server using ntdsutil. Note that the default is to retrun 1000 objects per page, and the setting is per server. If you have multiple DCs, you probably should either change them all, or choose one and make sure you specify that server as the target of the cmdlet. Hopefully they'll get a parameter added to allow handling multi-page gets. "Did" wrote: > hi, > while I use the get-adobject cmdlet to get users I found the answer is > limited to 1000. > How should I avoid this limitation ? > > Thanks > > |
My System Specs![]() |
| | #5 (permalink) |
| Guest | Re: get-adobject I would advise caution when changing the pagesize of a production domain controller. The defaults are in place to prevent Denial of Service like attacks on the domain controller. MS recommends the use of Paged queries instead since increasing the PageSize can cause performance issues on your DC. While the Get-ADObject doesn't yet support this, you can do the same thing with [NET] code. Probably worth posting a request on PSCX website to get this ability added to their cmdlet. Example of [NET] code that I posted on another thread: $de = [ADSI]'' $ads = new-object directoryservices.directorysearcher $ads.searchroot = $de $ads.filter = "(&(objectcategory=person)(objectclass=user))" $ads.pagesize = 100 $g = $ads.findall() $g.count "Rob Campbell" <RobCampbell@discussions.microsoft.com> wrote in message news:A658CE33-F489-46F3-BBDE-A4541861B160@microsoft.com... > As a workaround, you can increse the pagesize returned by the server using > ntdsutil. Note that the default is to retrun 1000 objects per page, and > the > setting is per server. If you have multiple DCs, you probably should > either > change them all, or choose one and make sure you specify that server as > the > target of the cmdlet. > > Hopefully they'll get a parameter added to allow handling multi-page gets. > > "Did" wrote: > >> hi, >> while I use the get-adobject cmdlet to get users I found the answer is >> limited to 1000. >> How should I avoid this limitation ? >> >> Thanks >> >> |
My System Specs![]() |
| | #6 (permalink) |
| Guest | Re: get-adobject I changed it on a DC I was confident would be able to handle the load, and there are 4 more DCs in that site. I just have to be careful to specify that one when I use the get-adobject cmdlet on searches that could return more than 1000 objects. I've already posted the request for an update, and Keith Hill (thanks, Keith!) has opened a work item to get it included in the next release. "Gaurhoth" wrote: > I would advise caution when changing the pagesize of a production domain > controller. The defaults are in place to prevent Denial of Service like > attacks on the domain controller. MS recommends the use of Paged queries > instead since increasing the PageSize can cause performance issues on your > DC. > > While the Get-ADObject doesn't yet support this, you can do the same thing > with [NET] code. Probably worth posting a request on PSCX website to get > this ability added to their cmdlet. > > Example of [NET] code that I posted on another thread: > > $de = [ADSI]'' > $ads = new-object directoryservices.directorysearcher > $ads.searchroot = $de > $ads.filter = "(&(objectcategory=person)(objectclass=user))" > $ads.pagesize = 100 > $g = $ads.findall() > $g.count > > > "Rob Campbell" <RobCampbell@discussions.microsoft.com> wrote in message > news:A658CE33-F489-46F3-BBDE-A4541861B160@microsoft.com... > > As a workaround, you can increse the pagesize returned by the server using > > ntdsutil. Note that the default is to retrun 1000 objects per page, and > > the > > setting is per server. If you have multiple DCs, you probably should > > either > > change them all, or choose one and make sure you specify that server as > > the > > target of the cmdlet. > > > > Hopefully they'll get a parameter added to allow handling multi-page gets. > > > > "Did" wrote: > > > >> hi, > >> while I use the get-adobject cmdlet to get users I found the answer is > >> limited to 1000. > >> How should I avoid this limitation ? > >> > >> Thanks > >> > >> > > |
My System Specs![]() |
| | #7 (permalink) |
| Guest | Re: get-adobject On Mar 19, 2:50 pm, Rob Campbell <RobCampb...@discussions.microsoft.com> wrote: > As a workaround, you can increse the pagesize returned by the server using > ntdsutil. Note that the default is to retrun 1000 objects per page, and the > setting is per server. If you have multiple DCs, you probably should either > change them all, or choose one and make sure you specify that server as the > target of the cmdlet. > > Hopefully they'll get a parameter added to allow handling multi-page gets. > > > > "Did" wrote: > > hi, > > while I use theget-adobjectcmdlet to get users I found the answer is > > limited to 1000. > > How should I avoid this limitation ? > > > Thanks- Hide quoted text - > > - Show quoted text - Hi, What is the parameter, and where ? |
My System Specs![]() |
| | #8 (permalink) |
| Guest | Re: get-adobject http://support.microsoft.com/kb/315071 The relevant value is "MaxPageSize". "Did" wrote: > On Mar 19, 2:50 pm, Rob Campbell > <RobCampb...@discussions.microsoft.com> wrote: > > As a workaround, you can increse the pagesize returned by the server using > > ntdsutil. Note that the default is to retrun 1000 objects per page, and the > > setting is per server. If you have multiple DCs, you probably should either > > change them all, or choose one and make sure you specify that server as the > > target of the cmdlet. > > > > Hopefully they'll get a parameter added to allow handling multi-page gets. > > > > > > > > "Did" wrote: > > > hi, > > > while I use theget-adobjectcmdlet to get users I found the answer is > > > limited to 1000. > > > How should I avoid this limitation ? > > > > > Thanks- Hide quoted text - > > > > - Show quoted text - > > Hi, > What is the parameter, and where ? > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| get-adobject only returns 1000 objects | Rob Campbell | PowerShell | 4 | 03-16-2007 01:31 PM |