For how long does that query run? There are limits within a session that will terminate the query after a time (I think it's one hour, by default).
But I think you're probably better off partitioning your search. One way to do that is to use the -RecipientTypeDetails to get only mailboxes of a certain type in each query. Another way would be to use the -Filter parameter.