Trying to run Exchange management Shell script on a schedule.
Scenario: I have Exchange scripts stored in E:\Scripts\Get-mailboxReport.ps1
Script is basically pulls mailbox report. If I run the script manually, I perform below:
.\Get-MailboxReport.ps1 -server Exchange01.contoso.local -filename c:\mailboxreport.csv
which generates a csv file in the specified directory.
I want to run this script using task scheduler, also I need to send this CSV file via email.
Please give me directions on how should I approach this