Export-Mailbox cmdlet 不删除电子邮件
我在 Powershell 中使用 Export-Mailbox cmdlet 从邮箱中删除两个日期之间的电子邮件时遇到问题。我正在运行的当前代码是:
Export-Mailbox -Identity mailboxname -StartDate "01/11/2009 00:00:01" -EndDate "14/11/2009 00:00:01" -DeleteContent
我知道这两个日期之间有电子邮件,但每次命令运行并完成时,都会给出状态消息“该步骤中发生错误:移动邮件。无法将邮件复制到目标邮箱存储出现错误:发生未知错误。”
有没有人成功使用 Export-Mailbox 删除邮件,或者知道为什么会出错?
谢谢。
- Jonny
~~~ 解决方案 ~~~
在 David 的帮助下,我再次运行了该命令,如下所示:
Get-Mailbox -Identity jonny | Export-Mailbox -TargetMailbox target -TargetFolder folder -EndDate "14/11/09 00:01:00" -StartDate "14/11/09 00:00:00" -DeleteContent
只要在该时间范围内没有超过 3000 封电子邮件,此命令就有效。
I've got an issue with using Export-Mailbox cmdlet in Powershell to delete emails between two dates from a mailbox. The current code that I am running is:
Export-Mailbox -Identity mailboxname -StartDate "01/11/2009 00:00:01" -EndDate "14/11/2009 00:00:01" -DeleteContent
I know there are emails that fall between these two dates, but every time the command runs and completes but gives a status message of "Error occurred in the step: Moving messages. Failed to copy messages to the destination mailbox store with error: An unknown error has occured."
Has any had success with using Export-Mailbox to delete messages, or know why this is erroring out?
Thanks.
- Jonny
~~~ SOLUTION ~~~
Using the help from David I ran the command again as follows:
Get-Mailbox -Identity jonny | Export-Mailbox -TargetMailbox target -TargetFolder folder -EndDate "14/11/09 00:01:00" -StartDate "14/11/09 00:00:00" -DeleteContent
This worked as long as there weren't any more than 3000 emails in that timespan.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试:
请参阅此有关使用 Export-Mailbox 的最常见问题的更多信息:
Try:
See this for more info about the most common problems using Export-Mailbox:
我也遇到了以下错误,我将源邮箱移动到另一家商店,然后它就工作了。
I was also getting below error, I moved source mailbox to another store and it then worked.