Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows exchange 2007如何从特定邮箱删除邮件_Windows_Powershell_Exchange Server - Fatal编程技术网

Windows exchange 2007如何从特定邮箱删除邮件

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

我想运行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.
}
从这里开始:


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

请参阅导出邮箱cmdlet的帮助。更多信息请点击此处: