none
GetSearchableMailboxes only return 1500 mailboxes paging? RRS feed

  • Question

  • I have this very simple script to get all the searchable mailboxes. I have 2000 mailboxes but this API return only 1500 every time. Wondering if the results are paged but there is no documentation regarding it. 

    Import-Module "C:\Program Files\Microsoft\Exchange\Web Services\2.2\Microsoft.Exchange.WebServices.dll";$Service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2013_SP1);#$Service.UseDefaultCredentials = $true;$Service.Credentials = New-Object System.Net.NetworkCredential("test@test.com", "test123!");$Service.Url ="https://exch2013.test.com/EWS/Exchange.asmx";$Service;$m = $Service.GetSearchableMailboxes([string]::Empty,$false);$count = 1; #$m.SearchableMailboxes | %{$_.SmtpAddress; $count++;}#$count; 


    Monday, February 12, 2018 10:25 PM

All replies

  • Hi Karanrshah,

    I'll move this thread to Exchange development forum, as they should have more professional knowledge on this and you may get effective solution timely.

    Thanks for your understanding,


    Best Regards,
    Niko Cheng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Tuesday, February 13, 2018 2:38 AM
    Moderator