Export-Mailbox cmdlet 不删除电子邮件

发布于 2024-08-14 18:29:55 字数 689 浏览 6 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

三月梨花 2024-08-21 18:29:55

尝试:

Get-Mailbox -Identity Jonny | Export-Mailbox -TargetMailbox mailboxname -StartDate "01/11/2009 00:00:01" -EndDate "14/11/2009 00:00:01" -DeleteContent

请参阅有关使用 Export-Mailbox 的最常见问题的更多信息:

使用中最常见的问题
导出邮箱相关于
权限。使用导出邮箱
您需要被委托进行交易所
服务器管理员角色,成为成员
本地管理员组的
目标服务器,并有完整的
访问源和目的地
邮箱。来源和目的地
邮箱必须在同一个 Active 中
目录林。

这些是一些常见的
与权限相关的错误:

错误

  • 指定的邮箱数据库 [邮箱数据库名称] 不存在

原因 运行 Export-Mailbox 命令的用户需要是
委派 Exchange 管理员
Exchange 服务器的角色。

错误

  • 步骤中发生错误:在目标邮箱中创建目标文件夹。发生未知错误。错误代码:-2147221233

原因
运行导出邮箱的用户没有目标邮箱的完全访问权限。

错误

  • 步骤中发生错误:移动消息。无法将邮件复制到目标邮箱存储,出现错误:MAPI 或未指定的服务提供商。 ID号:00000000-0000-00000000,错误代码:-1056749164”

原因
运行导出邮箱的用户没有完整的权限
访问目标邮箱。

Try:

Get-Mailbox -Identity Jonny | Export-Mailbox -TargetMailbox mailboxname -StartDate "01/11/2009 00:00:01" -EndDate "14/11/2009 00:00:01" -DeleteContent

See this for more info about the most common problems using Export-Mailbox:

The most common problems with using
Export-Mailbox are related to
permissions. To use Export-Mailbox
you need to be delegated the Exchange
Server Administrator role, be a member
of the local Administrators group for
the target server, and have full
access to the source and destination
mailboxes. The source and destination
mailboxes must be in the same Active
Directory forest.

These are some common
permissions-related errors:

ERROR

  • The specified mailbox database [Mailbox Database Name] does not exist

CAUSE The user running the Export-Mailbox command needs to be
delegated the Exchange Administrator
role for the Exchange server.

ERROR

  • Error occurred in the step: Creating target folder in the target mailbox. An unknown error has occurred., errorcode: -2147221233

CAUSE
The user running the Export-Mailbox does not have full access to the destination mailbox.

ERROR

  • Error occurred in the step: Moving messages. Failed to copy messages to the destination mailbox store with error: MAPI or an unspecified service provider. ID no: 00000000-0000-00000000, error code: -1056749164”

CAUSE
The user running the Export-Mailbox does not have full
access to the destination mailbox.

别靠近我心 2024-08-21 18:29:55

我也遇到了以下错误,我将源邮箱移动到另一家商店,然后它就工作了。

•步骤中发生错误:移动消息。复制消息失败
到目标邮箱存储时出现错误:MAPI 或未指定
服务提供商。 ID号:00000000-0000-00000000,错误代码:
-1056749164”

I was also getting below error, I moved source mailbox to another store and it then worked.

•Error occurred in the step: Moving messages. Failed to copy messages
to the destination mailbox store with error: MAPI or an unspecified
service provider. ID no: 00000000-0000-00000000, error code:
-1056749164”

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文