Use Search-Mailbox and delete the content. There is no switch to delete the source content using that command
https://learn.microsoft.com/en-us/powershell/module/exchange/search-mailbox?view=exchange-ps
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have an Exchange 2016 cu latest.
I want to export some mail items from the sent items to another folder in that same mailbox.
so this is what I do:
powershell
New-MailboxExportRequest -ContentFilter {(Sent -lt '01/01/2019') -and (Sent -gt '01/01/2015')} -includefolder "#sentitems#"-Mailbox "test" -FilePath \srvname\me$\test-archive.pst
New-MailboxImportRequest -Mailbox "test@test .com" -FilePath \srvname\me$\test-archive.pst -TargetRootFolder "sent items/mailarchive"
That works and I see the mail items in that created folder.
But those items are still in the sent items folder.
They are copied, not moved.
How can I become that an export is a move an d no copy?
Thanks for your knowledge.
Best regards
Kurt
Use Search-Mailbox and delete the content. There is no switch to delete the source content using that command
https://learn.microsoft.com/en-us/powershell/module/exchange/search-mailbox?view=exchange-ps