schedule powershell script
Posted on 2011-03-08
I am very new to powershell. I was given the below command to export any mail that has specific keywords in it. It works great, but I need it to run a lot of different searches, and wanted to script it so that I didn't have to babysit it. How do i script it when it asks for a folder to put the messages in? It also asks to confirm for all mailboxes. I would also like to schedule this to run in the evening, so any help with scheduling it would be great, but I am guessing that I can figure that part out.
Get-mailboxdatabase –identity special | get-mailbox | export-mailbox –subjectkeywords “search” –targetmailbox mailbox