Exchange Online / Office 365 : E-Mail senden über die Powershell
E-Mail senden über Office 365 mit der Powershell
[System.Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $PWD = 'YOURPASSWORD' | ConvertTo-SecureString -AsPlainText -Force $USER = New-Object System.Management.Automation.PSCredential ("USERLOGIN", $PWD) $Para = @{ SmtpServer = 'smtp.office365.com' UseSsl = $true Port = '587' Credential = $USER Body = 'TESTMAIL' To = 'EMPFÄNGERADRESSE' From = 'SENDERADRESSE' Subject = 'Testmail' } Send-MailMessage @Para