Another bug in the OSCEXO module… When searching for mails within a mailbox well known folder with more than “PageSize” messages the cmdlet Search-OSCEXOEmailMessage never return and keeps “searching” forever (or until you run out of memory – whatever happens first). The reason behind this is that the code that handles the “ExchangeService.FindItems()” calls does not increase the PageOffset and effectively loops forever on the same “ViewItem”.
As a workaround you can specify a PageSize of sufficient size (or change the default PageSize within the PowerShell module code).