


Thus, the combination of PowerShell and SSH will deliver a robust and secure solution to automate and to remotely manage Linux and Windows systems.

A popular request the PowerShell team has received is to use Secure Shell protocol and Shell session (aka SSH) to interoperate between Windows and Linux – both Linux connecting to and managing Windows via SSH and, vice versa, Windows connecting to and managing Linux via SSH. ToRecipients = "#aph.: Read more about our detailed plans, roadmap, and where you can play with the in-progress code here.Īs Microsoft has shifted towards a more customer-oriented culture, Microsoft engineers are using social networks, tech communities and direct customer feedback as an integral part on how we make decisions about future investments. $filenameBase64string = ::ToBase64String(::ReadAllBytes($filename))Ĭontent = "Please find Important Document attached" You also need to convert the file Attachment to a Base64 encoded string so that it can be added to the JSON message. It's a little more complicated than a vanilla Send-MailMessage, because you need to use JSON to create the configuration. The O365 supported method is to use Microsoft Graph to send the message with attachment. Therefore, it's use is now obsolete when trying to use it with Exchange Online/O365 servers. It was primarily designed to work with on-premise Exchange Servers and didn't have to worry about those pesky things like MFA or options for using key/value/tokens for authentication. Send-MailMessage uses Basic Authentication (Username and password with an option to use SSL) but wasn't made to use Modern Authentication methods. All client applications need to switch to Modern Authentication/OAuth or Microsoft Graph API to continue to function. This includes Exchange Web Services (EWS), Exchange ActiveSync (EAS), POP, IMAP, Remote PowerShell, MAPI, RPC, SMTP AUTH, and OAB. The reason is as part of Microsoft’s "Secure by Default" policy, Microsoft is permanently disabling Basic Authentication in Exchange Online for everyone on Octo( Basic Authentication and Exchange Online – September 2021 Update - Microsoft Tech Community). For example, Send-MailMessage still works just fine when you continue to connect to your on-premise Exchange Server so why the message?

What the Send-MailMessage documentation's warning that Send-MailMessage is obsolete fails to mention is the underlying reason as to why it is now obsolete.
