切换到宽版
  • 18621阅读
  • 14回复

[求助]如何根据邮件组删除误发送的邮件 [复制链接]

上一主题 下一主题
 

只看楼主 正序阅读 0楼  发表于: 2012-11-01
    有时候公司员工总是误发送一封邮件,撤销的话不一定能把邮件撤回,通过命令行可以删除邮件,但是一般发送的都是多个邮件组,怎样删除?
下面条命令式通过OU 删除一封主题为“Test Mail"的邮件,只要邮件没有收到本地就可以删除,希望知道的,告诉我怎样可以通过邮件组来删除误发送的邮件,如果通过数据库的话,检索太慢,最好能以邮件组来删除,,,   非常感谢!!

Get-Mailbox -OrganizationalUnit:users | Export-Mailbox -SubjectKeywords "Test Mail" -DeleteContent
分享到

只看该作者 14楼  发表于: 2012-11-23
回 13楼(system_linux) 的帖子
system_linux:这个命令可以用来了,但是邮件删除不了,也没有收到本地,没有读取过,提示也已经删除了。麻烦你再看下,谢谢!1
[PS] C:\>Get-DistributionGroupMember -Identity myr | Export-Mailbox -SubjectKeyw
ords "测试" -DeleteContent
.......(2012-11-20 18:33)嬀/color]

建议先用英文的关键词搜搜看例如test

此外,Export-Mailbox命令后面加上TargetMailbox和TargetFolder再试试看

只看该作者 13楼  发表于: 2012-11-20
回 12楼(opop) 的帖子
这个命令可以用来了,但是邮件删除不了,也没有收到本地,没有读取过,提示也已经删除了。麻烦你再看下,谢谢!1

[PS] C:\>Get-DistributionGroupMember -Identity myr | Export-Mailbox -SubjectKeyw

ords "测试" -DeleteContent

RsgDatabaseGuid                  :
StandardMessagesDeleted          : 0
AssociatedMessagesDeleted        : 0
DumpsterMessagesDeleted          : 0
MoveType                         : DeleteOnly
MoveStage                        : Completed
StartTime                        : 2012-11-20 18:13:40
EndTime                          : 2012-11-20 18:14:16
StatusCode                       : 0
StatusMessage                    : 邮件已从源邮箱中删除。
ReportFile                       : C:\Program Files\Microsoft\Exchange Server\L
                                   ogging\MigrationLogs\export-Mailbox20121120-
                                   180729-2062980.xml

Identity                         : lp.com/Users/a30
DistinguishedName                : CN=a30,CN=Users,DC=lp,DC=com
DisplayName                      : a30
Alias                            : a30
LegacyExchangeDN                 : /o=First Organization/ou=Exchange Administra
                                   tive Group (FYDIBOHF23SPDLT)/cn=Recipients/c
                                   n=a30
PrimarySmtpAddress               : a30@lp.com
SourceServer                     : EX2007.lp.com
SourceDatabase                   : EX2007\Second Storage Group\Second DataBase
SourceGlobalCatalog              : EXDC
SourceDomainController           :
TargetGlobalCatalog              : EXDC
TargetDomainController           :
TargetMailbox                    :
TargetServer                     :
TargetDatabase                   :
MailboxSize                      : 308535KB
IsResourceMailbox                : False
SIDUsedInMatch                   :
SMTPProxies                      :
SourceManager                    :
SourceDirectReports              :
SourcePublicDelegates            :


只看该作者 12楼  发表于: 2012-11-20
回 11楼(system_linux) 的帖子
system_linux:[PS] C:\>Get-DistributionGroup -Identity myr | fl
GroupType: Universal, SecurityEnabled
.......(2012-11-20 13:19)嬀/color]

试了下,下面这组命令只适用于动态通讯组,

PS> $Test = Get-DistributionGroup -Identity test

PS>Get-Recipient -RecipientPreviewFilter $Test.RecipientFilter |Export-Mailbox -TargetMailbox administrator -TargetFolder DeletedEmails -SubjectKeywords "Subject" -IncludeFolders "\inbox" -StartDate "03/09/2009"-DeleteContent

对于一般的通讯组是没有RecipientFilter这个参数的,这种情况下你可以尝试下列命令:

PS>Get-DistributionGroupMember -Identity test | Export-Mailbox -TargetMailbox administrator -TargetFolder DeletedEmails -SubjectKeywords "Subject" -IncludeFolders "\inbox" -StartDate "03/09/2009"-DeleteContent

只看该作者 11楼  发表于: 2012-11-20
回 9楼(opop) 的帖子
opop:Get-DistributionGroup -Identity myr | fl
看看有没有RecipientFilter这个值,可能属性名称有偏差 (2012-11-14 12:27) 

[PS] C:\>Get-DistributionGroup -Identity myr | fl


GroupType                          : Universal, SecurityEnabled
SamAccountName                     : myr
ExpansionServer                    :
ReportToManagerEnabled             : False
ReportToOriginatorEnabled          : True
SendOofMessageToOriginatorEnabled  : False
ManagedBy                          :
AcceptMessagesOnlyFrom             : {}
AcceptMessagesOnlyFromDLMembers    : {}
AddressListMembership              : {\默认全局地址列表, \所有组}
Alias                              : myr
OrganizationalUnit                 : lp.com/Users
CustomAttribute1                   :
CustomAttribute10                  :
CustomAttribute11                  :
CustomAttribute12                  :
CustomAttribute13                  :
CustomAttribute14                  :
CustomAttribute15                  :
CustomAttribute2                   :
CustomAttribute3                   :
CustomAttribute4                   :
CustomAttribute5                   :
CustomAttribute6                   :
CustomAttribute7                   :
CustomAttribute8                   :
CustomAttribute9                   :
DisplayName                        : myr
EmailAddresses                     : {SMTP:myr@lp.com}
GrantSendOnBehalfTo                : {}
HiddenFromAddressListsEnabled      : False
LegacyExchangeDN                   : /o=First Organization/ou=Exchange Admini
                                     rative Group (FYDIBOHF23SPDLT)/cn=Recipi
                                     ts/cn=myr
MaxSendSize                        : unlimited
MaxReceiveSize                     : unlimited
PoliciesIncluded                   : {{60E0D251-85CE-4646-927E-7BAD62ABD483},
                                     6491CFC-9E50-4857-861B-0CB8DF22B5D7}}
PoliciesExcluded                   : {}
EmailAddressPolicyEnabled          : True
PrimarySmtpAddress                 : myr@lp.com
RecipientType                      : MailUniversalSecurityGroup
RecipientTypeDetails               : MailUniversalSecurityGroup
RejectMessagesFrom                 : {}
RejectMessagesFromDLMembers        : {}
RequireSenderAuthenticationEnabled : False
SimpleDisplayName                  :
UMDtmfMap                          : {}
WindowsEmailAddress                : myr@lp.com
IsValid                            : True
OriginatingServer                  : EXDC.lp.com
ExchangeVersion                    : 0.1 (8.0.535.0)
Name                               : myr
DistinguishedName                  : CN=myr,CN=Users,DC=lp,DC=com
Identity                           : lp.com/Users/myr
Guid                               : d5bd0bf5-ace3-40d4-b3a8-7d25f55d31f1
ObjectCategory                     : lp.com/Configuration/Schema/Group
ObjectClass                        : {top, group}
WhenChanged                        : 2012-11-20 8:45:59
WhenCreated                        : 2012-9-17 10:34:02



[PS] C:\>

只看该作者 10楼  发表于: 2012-11-20
回 9楼(opop) 的帖子
opop:Get-DistributionGroup -Identity myr | fl
看看有没有RecipientFilter这个值,可能属性名称有偏差 (2012-11-14 12:27) 

[PS] C:\Documents and Settings\Administrator.LP>Get-DistributionGroup -Identit
myr | fl


GroupType                          : Universal, SecurityEnabled
SamAccountName                     : myr
ExpansionServer                    :
ReportToManagerEnabled             : False
ReportToOriginatorEnabled          : True
SendOofMessageToOriginatorEnabled  : False
ManagedBy                          :
AcceptMessagesOnlyFrom             : {}
AcceptMessagesOnlyFromDLMembers    : {}
AddressListMembership              : {\默认全局地址列表, \所有组}
Alias                              : myr
OrganizationalUnit                 : lp.com/Users
CustomAttribute1                   :
CustomAttribute10                  :
CustomAttribute11                  :
CustomAttribute12                  :
CustomAttribute13                  :
CustomAttribute14                  :
CustomAttribute15                  :
CustomAttribute2                   :
CustomAttribute3                   :
CustomAttribute4                   :
CustomAttribute5                   :
CustomAttribute6                   :
CustomAttribute7                   :
CustomAttribute8                   :
CustomAttribute9                   :
DisplayName                        : myr
EmailAddresses                     : {SMTP:myr@lp.com}
GrantSendOnBehalfTo                : {}
HiddenFromAddressListsEnabled      : False
LegacyExchangeDN                   : /o=First Organization/ou=Exchange Adminis
                                     rative Group (FYDIBOHF23SPDLT)/cn=Recipie
                                     ts/cn=myr
MaxSendSize                        : unlimited
MaxReceiveSize                     : unlimited
PoliciesIncluded                   : {{60E0D251-85CE-4646-927E-7BAD62ABD483},{
                                     6491CFC-9E50-4857-861B-0CB8DF22B5D7}}
PoliciesExcluded                   : {}
EmailAddressPolicyEnabled          : True
PrimarySmtpAddress                 : myr@lp.com
RecipientType                      : MailUniversalSecurityGroup
RecipientTypeDetails               : MailUniversalSecurityGroup
RejectMessagesFrom                 : {}
RejectMessagesFromDLMembers        : {}
RequireSenderAuthenticationEnabled : False
SimpleDisplayName                  :
UMDtmfMap                          : {}
WindowsEmailAddress                : myr@lp.com
IsValid                            : True
OriginatingServer                  : EXDC.lp.com
ExchangeVersion                    : 0.1 (8.0.535.0)
Name                               : myr
DistinguishedName                  : CN=myr,CN=Users,DC=lp,DC=com
Identity                           : lp.com/Users/myr
Guid                               : d5bd0bf5-ace3-40d4-b3a8-7d25f55d31f1
ObjectCategory                     : lp.com/Configuration/Schema/Group
ObjectClass                        : {top, group}
WhenChanged                        : 2012-11-20 8:45:59
WhenCreated                        : 2012-9-17 10:34:02



[PS] C:\Documents and Settings\Administrator.LP>




只看该作者 9楼  发表于: 2012-11-14
回 7楼(system_linux) 的帖子
system_linux:依然返回的是空。。 什么原因呢。。。
[PS] C:\>$myr = Get-DistributionGroup -Identity myr
[PS] C:\>$myr
.......(2012-11-07 19:27)嬀/color]

Get-DistributionGroup -Identity myr | fl
看看有没有RecipientFilter这个值,可能属性名称有偏差

只看该作者 8楼  发表于: 2012-11-13
回 3楼(flowerwaiter) 的帖子
flowerwaiter:$Test是在第一个命令里面定义的通讯组($Test = Get-DistributionGroup -Identity “通讯组名”) (2012-11-02 15:07) 

你好:
    如果我想删除公用文件夹里某个文件夹下指定时间内投递的邮件,应该怎样删除呢?在powershell删除,在图形化界面删除太慢、太卡。。。

只看该作者 7楼  发表于: 2012-11-07
回 6楼(opop) 的帖子
opop:报错显示$myr.RecipientFilter为空
你在执行完$myr = Get-DistributionGroup -Identity myr之后分别执行
$myr
....... (2012-11-07 11:09) 

依然返回的是空。。 什么原因呢。。。
[PS] C:\>$myr = Get-DistributionGroup -Identity myr
[PS] C:\>$myr

Name                DisplayName         GroupType           PrimarySmtpAddress
----                -----------         ---------           ------------------
myr                 myr                 Universal, Secur... myr@lp.com


[PS] C:\>$myr.RecipientFilter
[PS] C:\>

只看该作者 6楼  发表于: 2012-11-07
回 5楼(system_linux) 的帖子
system_linux:我试着运行了该命令,可是依然报错,麻烦你再看看,非常感谢!!!
[PS] C:\>$myr = Get-DistributionGroup -Identity myr
.......(2012-11-05 13:36)嬀/color]

报错显示$myr.RecipientFilter为空

你在执行完$myr = Get-DistributionGroup -Identity myr之后分别执行
$myr
$myr.RecipientFilter
看看是否有返回结果
快速回复
限60 字节
 
上一个 下一个