ModernMailTools Module
PowerShell Gallery: ModernMailTools
#Install-Module ExchangeOnlineManagement
Install-Module ModernMailTools
# Enable-MailMessageAlias
Description
Send emails in PowerShell via Graph API, or SMTP (MailKit) with Modern Auth (OAuth) support.
ModernMailTools Cmdlets
Enable-MailMessageAlias
Enables Send-MailMessage command alias in the current PowerShell session. /* Enables convenient aliases for the ModernMailTools cmdlets, allowing you to use familiar command names such as Send-MailMessage in place of Send-ModernMailMessage. This helps maintain compatibility with scripts that use legacy cmdlet names. */
Get-ModernDomainScanReport
Retrieves and optionally displays a domain security scan report from Global Cyber Alliance.
Invoke-ModernMailHybridReport
Generates a Exchange Hybrid report for Microsoft 365 (ModernMail Hybrid Report, Exchange Hybrid Report, Microsoft365 Hybrid Report).
Register-ModernMailMessageEntraIDApp
Registers an app in Entra ID, assigning necessary permissions and outputting relevant information. /* Registers an application in Microsoft Entra ID (Azure AD) with the necessary permissions for sending email via Microsoft Graph or SMTP using modern authentication. This cmdlet streamlines the process of setting up app-based authentication for secure email operations. */
Send-ModernMailMessage
The Send-ModernMailMessage cmdlet sends an email message from within PowerShell. /* Sends email messages from PowerShell using either Microsoft Graph API or SMTP with OAuth 2.0 (Modern Auth). Supports advanced features such as attachments, HTML body, CC/BCC, and flexible authentication methods, making it a modern replacement for the legacy Send-MailMessage cmdlet. */