![](/img/trans.png)
[英]PowerShell - Office 365 mailbox - get emails from specific folder
[英]Bulk deleting all emails within “inbox” folder from a specific mailbox using PowerShell
我正在尝试删除特定邮箱“ GTV信息”的“收件箱”文件夹中的48000封电子邮件。 我只想删除“收件箱”文件夹中的所有电子邮件,并保持“收件箱”文件夹为空。
Exchange Server 2007年SP1 08.01.0436.000
我正在发出此命令,这是我收到的错误消息:
[PS] C:\Windows\system32>Export-Mailbox -Identity "GTV Info"
-IncludeFolders "\Inbox" -StartDate "16/11/2009" -EndDate "24/08/2011" -DeleteContent
Confirm Are you sure you want to perform this action? Searching the contents and/or the associated messages from the mailbox 'GTV Info' and deleting those messages that meet the criteria specified. This operation may take a long time to complete. [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):A Export-Mailbox : Error was found for GTV Info (info@gt-vehicles.com) because: E rror occurred in the step: Moving messages. Failed to copy messages to the dest ination mailbox store with error: MAPI or an unspecified service provider. ID no: 00000000-0000-00000000, error code: -1056749164 At line:1 char:15
+ Export-Mailbox <<<< -Identity "GTV Info" -IncludeFolders "\Inbox" -StartDate "16/11/2009" -EndDate "24/08/2011" -DeleteContent
+ CategoryInfo : InvalidOperation: (0:Int32) [Export-Mailbox], Re cipientTaskException
+ FullyQualifiedErrorId : 35CD2975,Microsoft.Exchange.Management.Recipient Tasks.ExportMailbox
Identity : gtv.local/MyBusiness/Users/SBSUsers/GTV Info DistinguishedName : CN=GTV Info,OU=SBSUsers,OU=Users,OU=MyBusine
ss,DC=gtv,DC=local DisplayName : GTV Info Alias : info LegacyExchangeDN : /o=First Organization/ou=Exchange Administra
tive Group (FYDIBOHF23SPDLT)/cn=Recipients/c
n=info PrimarySmtpAddress : info@gt-vehicles.com SourceServer : SAGITARIUS.gtv.local SourceDatabase : SAGITARIUS\First Storage Group\Mailbox Datab
ase SourceGlobalCatalog : SAGITARIUS SourceDomainController : TargetGlobalCatalog : SAGITARIUS TargetDomainController : TargetMailbox : TargetServer : TargetDatabase : MailboxSize : 1928KB IsResourceMailbox : False SIDUsedInMatch : SMTPProxies : SourceManager : SourceDirectReports : SourcePublicDelegates : SourcePublicDelegatesBL : SourceAltRecipient : SourceAltRecipientBL : SourceDeliverAndRedirect : MatchedTargetNTAccountDN : IsMatchedNTAccountMailboxEnabled : MatchedContactsDNList : TargetNTAccountDNToCreate : TargetManager : TargetDirectReports : TargetPublicDelegates : TargetPublicDelegatesBL : TargetAltRecipient : TargetAltRecipientBL : TargetDeliverAndRedirect : Options : DeleteSourceContent SourceForestCredential : TargetForestCredential : TargetFolder : PSTFilePath : RsgMailboxGuid : RsgMailboxLegacyExchangeDN : RsgMailboxDisplayName : RsgDatabaseGuid : StandardMessagesDeleted : 0 AssociatedMessagesDeleted : 0 DumpsterMessagesDeleted : 0 MoveType : DeleteOnly MoveStage : Move StartTime : 26/08/2015 13:12:15 EndTime : 26/08/2015 13:12:16 StatusCode : -1056749164 StatusMessage : 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 ReportFile : C:\Program Files\Microsoft\Exchange Server\L
ogging\MigrationLogs\export-Mailbox20150826-
131211-5306000.xml
[PS] C:\Windows\system32>
我对此非常坚持,我真的需要这个很棒的社区的帮助。
在您的命令中,您缺少将电子邮件导出到的目的地。
您无法使用的命令:
Export-Mailbox -Identity "GTV Info" -IncludeFolders "\Inbox" -StartDate "16/11/2009" -EndDate "24/08/2011" -DeleteContent
定义了目的地后,它看起来像这样:
Export-Mailbox -Identity "GTV Info" -IncludeFolders "\Inbox" -StartDate "16/11/2009" -EndDate "24/08/2011" -DeleteContent -PSTFolderPath 'C:\PSTFiles\Mails.pst'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.