【问题标题】:exchange 2007 how to delete messages from specific mailboxesexchange 2007如何删除特定邮箱中的邮件
【发布时间】:2012-09-27 02:51:00
【问题描述】:

我想运行一个 powershell 命令来删除在特定日期发送给特定个人的包含特定主题的消息。

您能否建议我或指出我在一个可以执行此操作的 powershell 脚本上的正确方向?

非常感谢您的指导。

我发现了一个很酷的脚本:

#Add Exchanage snapin
add-pssnapin Microsoft.Exchange.Management.PowerShell.Admin

#Get list of mailboxes to delete
$users=Get-Content C:\MailboxesToDelete.txt

#For Loop to delete them
foreach ($user in $users)
{
#Print to screen user mailbox to delete
$user
#Delete AD user and Mailbox
Remove-Mailbox -Identity $user -Permanent $true -whatif

#Remove the -whatif if you want to really delete some users.
}

从这里开始:

http://randomtechminutia.wordpress.com/2012/05/03/powershell-script-to-delete-exchange-mailboxes-in-mass/

但这会删除邮箱而不是邮件!

【问题讨论】:

    标签: windows powershell exchange-server


    【解决方案1】:

    请参阅Export-Mailbox cmdlet 的帮助。更多信息在这里:

    http://technet.microsoft.com/en-us/library/bb266964(v=exchg.80).aspx

    【讨论】:

      猜你喜欢
      • 2010-09-07
      • 1970-01-01
      • 2011-06-01
      • 2014-05-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-07
      • 1970-01-01
      相关资源
      最近更新 更多