Error when running with no SendMail parameter
Closed this issue · 0 comments
denisvm commented
That's the output that I get when try to run with no -SendMail
parameter:
PS C:\Scripts> C:\Scripts\Run-PurgeLogFiles.ps1
If -SendMail specified, -MailFrom, -MailTo and -MailServer must be specified as well!
At C:\Scripts\Purge-LogFiles.ps1:203 char:5
+ Throw 'If -SendMail specified, -MailFrom, -MailTo and -MailServer must be sp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (If -SendMail sp...cified as well!:String) [], RuntimeException
+ FullyQualifiedErrorId : If -SendMail specified, -MailFrom, -MailTo and -MailServer must be specified as well!