Windows exchange 2007如何从特定邮箱删除邮件
我想运行powershell命令删除在特定日期发送给特定个人并包含特定主题的邮件 你能给我提个建议或者给我指出一个正确的方向吗 非常感谢您的指导 我发现了一个很酷的脚本:Windows exchange 2007如何从特定邮箱删除邮件,windows,powershell,exchange-server,Windows,Powershell,Exchange Server,我想运行powershell命令删除在特定日期发送给特定个人并包含特定主题的邮件 你能给我提个建议或者给我指出一个正确的方向吗 非常感谢您的指导 我发现了一个很酷的脚本: #Add Exchanage snapin add-pssnapin Microsoft.Exchange.Management.PowerShell.Admin #Get list of mailboxes to delete $users=Get-Content C:\MailboxesToDelete.txt #Fo
#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.
}
从这里开始:
但这会删除邮箱而不是邮件 请参阅导出邮箱cmdlet的帮助。更多信息请点击此处: