Alex Gordon
Alex Gordon

Reputation: 60871

running file from exchange powershell

I would like to know how to run a file like this:

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

etc

I have about 1000 lines that I need to run in the exchange 2010 powershell

How do I do this?

Upvotes: 0

Views: 110

Answers (1)

Mathias R. Jessen
Mathias R. Jessen

Reputation: 174900

Issue this command in the shell before executing your script:

$ConfirmPreference = "None"

Reference

Upvotes: 1

Related Questions