Scheduled Tasks - PowerShell Scripts with Parameters
Perhaps a very “simple” issue, but I noticed that when looking for this it took me longer than expected to find the result I had in mind.
The issue at hand
I have a script which requires various parameters to be provided so that I can run it. When running the command through an active console session it would look like this:
.\Get-MailboxAuditLoggingReport.ps1 -Mailbox ProblemMailbox -Hours 24 -SendEmail -MailFrom administrator@contoso.com -MailTo administrator@contoso.com -MailServer mail.contoso.comAs you can see, this can be quite the pain, but if I get this configured properly can re-use this at various customers.
