Posted August 12, 20195 yr I have added a powershel script to Pulseway and scheduled it. On the Server the script is running well, but with Pulseway it has a problem to send a mail with the PS command: Send-MailMessage. + Send-MailMessage -To $user.EmailAddress -BCC $MailSender -Fr ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:Sm tpClient) [Send-MailMessage], SmtpException + FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.Send MailMessage The command is: Send-MailMessage -To $user.EmailAddress -From $MailSender -SmtpServer $SMTPServer -Subject $Subject -Body $EmailBody What is the reason for the error ?? I use this script: https://4sysops.com/archives/a-password-expiration-reminder-script-in-powershell/
August 26, 20195 yr Staff Hi @Christian Kiesel, Please verify that you can access SMTP server without providing user credentials? Please try to use the script from this post. Note: If the PowerShell Impersonation is not configured, the PowerShell scripts run using the System account.
Create an account or sign in to comment