I am sending an e-mail with MS Outlook via PowerShell and the script below works great, except it displays a number of prompts which i want to suprss, since in the future the script will run from Windows scheduler. Can anyone help?
$ol = New-Object -comObject Outlook.Application
$message = $ol.CreateItem(0)
$message.Subject = "Report"
$message.Body = "Attachment contains one report"
# Attach a file
$file = "C:\TestReport.csv"