Open powershell and connect to Exchange Online (see earlier post).
You can only copy the contents from the source mailbox into a folder on target mailbox. Use the following command –
Search-Mailbox source-id -TargetMailbox target-id -LogLevel full
You will be prompted to enter a folder name. Once you have entered the name the command will run. This will probably take several minutes and a small report will be displayed at the end.
Close the session to Exchange Online
On your local computer, open Windows PowerShell and run the following command –
$UserCredential = Get-Credential
In the Windows PowerShell Credential Request dialog box, type your Office 365 user name and password, and then click OK.
Run the following command –
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Then run the command –
You need to connect to the Microsoft Online Service for a number of operations. To do so run the following command using the credentials you input as above –
Connect-MsolService -Credential $UserCredential
Once you have finished with the session run the command –