Copy e-mails from one account to another within office 365
Dear Experts
I want to move(copy) mailbox contents (emails, contacts & calendar items) to another mailbox within the same tenant (same exchange plan). I don't want to export and import as PST simply because the size of the mailboxes and possibility of corruption.
I found the following powershell commands to transfer mailbox cotent and structure however powershell doesn't recognise the command "search-mailbox"
Please can someone shed some light on how this can be acheived using office 365 powershell.
Many Thanks
Microsoft 365PowershellMicrosoft Office
Last Comment
RobKanj
8/22/2022 - Mon
Vasil Michev (MVP)
You need to be granted permissions in order to use the Search-Mailbox cmdlet. Add yourself as a member of the "Mailbox Import Export" role in Exchange admin center -> Permissions -> Admin roles
Thank you Vasil, I'm able to run the command now. i'v tested copying all content from one mailbox to another however although i've mentioned on the script to copy all content to a subfolder all e-mails are also copied onto the inbox. so is there a way to copy all contents only to the subfolder and not to the inbox.
the above code successfully created "copied_from_john" folder in Smith's mailbox and copied all the folders and e-mails from John's mailbox. however I noticed that all the e-mails from John's mailbox also have copied onto Smith's inbox as well. this is a problem as it will consume more space in Smith's mailbox as there will duplicate e-mails of john.
would you know the command to just copy all the mails and folders only on the target folder?