How can I send emails from one mail box to another in exchange server 2019 around 10000 mails using script.

Kanav Sharma 25 Reputation points
2023-06-14T11:59:42.49+00:00

Hi There,

I need a script for the exchange server 2019 which will send 5000-10000 emails from one mailbox to another mailbox in the exchange server 2019. Please help me as much possible as. I want this by using PowerShell or batch script. I want to do this by using a script. Please help me out.

Thanks.

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,178 questions
Exchange | Exchange Server | Other
Exchange | Exchange Server | Development
Exchange | Exchange Server | Management
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Glen Scales 4,446 Reputation points
    2023-06-15T04:19:52.53+00:00

    By send i guess you mean copy or move ? the easiest way to do that with PowerShell would be to use the Import and Export cmdlets to first export the messages you want to copy the re-import them https://learn.microsoft.com/en-us/exchange/recipients/mailbox-import-and-export/mailbox-import-and-export?view=exchserver-2019 one example https://blog.jijitechnologies.com/copy-move-emails-between-office365-mailboxes-using-powershell . If you not doing the whole mailbox you should be able to use filters to include/exclude what you want.

    If both mailboxes are on the same server you can do it with an EWS script if you need some more fine grained copy method https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-move-and-copy-email-messages-by-using-ews-in-exchange

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.