我正在尝试search邮箱(在导出到PST后)并删除符合特定条件的邮件。
每次我尝试运行search邮箱命令,我得到以下输出:
The target mailbox or .pst file path is required. + CategoryInfo : InvalidArgument: (:) [], ArgumentException + FullyQualifiedErrorId : 79CD2AE3
我甚至尝试了PowerShell显示的例子,并且仍然得到相同的消息。
尝试一个命令的例子:
[PS] C:\Windows\system32>Search-Mailbox -Identity "David Tester" -SearchQuery "Subject:'Your bank statement'" The target mailbox or .pst file path is required. + CategoryInfo : InvalidArgument: (:) [], ArgumentException + FullyQualifiedErrorId : 79CD2AE3 [PS] C:\Windows\system32>
任何帮助将是伟大的
谢谢
问题是你需要有一些目标邮箱和文件夹,否则DeleteContent标志。
Search-Mailbox -Identity "April Stewart" -SearchQuery 'Subject:"Your bank statement"' -TargetMailbox "administrator" -TargetFolder "SearchAndDeleteLog" -LogOnly -LogLevel Full
上面的例子是一个只logging日志的search,不会移动任何消息。
请参阅“search邮箱”命令的手册页,并注意需要哪些开关。