我使用以下命令删除邮箱的内容,但它仍然提示我确认。有没有办法不提示我。
Search-Mailbox -id "UserName" -DeleteContent -Confirm:$false
我使用以下命令删除邮箱的内容,但它仍然提示我确认。有没有办法不提示我。
Search-Mailbox -id "UserName" -DeleteContent -Confirm:$false
停止提示的方法是使用-Force
参数(如果 cmdlet 支持的话)。
设置-Confirm
为$false
只是意味着“如果需要,请提示我”。设置-Confirm
为$true
意味着“每次都提示我”。
似乎存在语法错误-confirm
,例如-DeleteContent
,SwitchParameter
这意味着您只需要省略它。
Search-Mailbox -id "UserName" -DeleteContent
简单的事情只是通过/Library/Mail/v2/MailData
并删除带有名称的文件,
Envelope
然后所有内容将从Mail App中删除