从exchange PowerShell运行文件

时间:2012-03-29 00:14:13

标签: powershell exchange-server

我想知道如何运行这样的文件:

Search-Mailbox -Identity arrwest -SearchQuery “Subject:MLIS Volume Report”,”From:cmctrymullin”,”Sent:today” -DeleteContent
Search-Mailbox -Identity ceringle -SearchQuery “Subject:MLIS Volume Report”,”From:cmcmtrullin”,”Sent:today” -DeleteContent

我需要在Exchange 2010 powershell中运行大约1000行

我该怎么做?

1 个答案:

答案 0 :(得分:1)

在执行脚本之前在shell中发出此命令:

$ConfirmPreference = "None"

Reference