This module can be used in production environments. Releases after 1.1.0 follow Semantic Versioning 2.0.0: breaking changes increase the major version, new backward-compatible functionality increases the minor version, and backward-compatible fixes increase the patch version. Check CHANGELOG.md before updating to a new major version, and see RELEASING.md for the full versioning and release policy.
PowerShell Module to Connect Scripts to Messaging Services (Email, Chat, etc.).
ScriptMessage is designed to simplify the use of messaging services in PowerShell scripts. For example, you can:
- Take advantage advantage of the Microsoft Graph SDK PowerShell module (Graph API) and other messaging modules or APIs without having to learn all the object formatting that they require to send email and chat messages.
- Specify more than one service in a single command to easily send the same message multiple ways for redundancy or other purposes. For example, you might want to send an email using Microsoft Graph and a chat message using both Teams & Slack for the same alert.
- Easily switch the desired messaging service(s) in your scripts by updating simple config files. Whether your current messaging service is deprecated, you need to add a new service, or switch to a different service, you will no longer need to rewrite all of your scripts.
- Microsoft Graph SDK PowerShell: Take advantage of the Microsoft Graph SDK PowerShell module to send email and chat messages using the Graph API without having to learn all the object formatting that the API requires (which unfortunately the SDK doesn't simplify).
- Since the Microsoft Graph API only supports Teams Chat when using delegated permissions, we are looking into Teams Bots support for future releases to allow for application permissions.
- Currently, the ScriptMessage module only supports one-on-one and group chats. Teams Channel chats will be enabled in a future release.
- Specific Modules Used (if you want to minimize footprint):
- Microsoft.Graph.Authentication (Mail & Chat)
- Microsoft.Graph.Users.Actions (Mail Only)
- Microsoft.Graph.Teams (Chat Only)
- Microsoft.Graph.Files (Mail & Chat - Only if OneDrive Uploads are Needed)
- Mailozaurr: Support is planned in future releases. Mailozaurr is a PowerShell module that aims to provide SMTP, POP3, IMAP and few other ways to interact with Email. Underneath it uses MimeKit and MailKit and EmailValidation libraries.
- Slack: Support is planned in future releases. Send messages into channels (including ephemeral messages) or directly to users.
- PSGSuite: Support is planned in future releases. Send Google Workspace Gmail & Chat messages. PSGSuite is a PowerShell module wrapping Google's .NET SDKs.
See CHANGELOG.md for information on the latest updates, as well as past releases.
The ScriptMessage module documentation is hosted in the ScriptMessage Wiki. Examples are included in the Sample Usage Scripts folder as well as in the comment-based help for each function/cmdlet (e.g., Get-Help Connect-ScriptMessage).
This project is developed using a simplified Gitflow workflow that cuts out the release branches, which are unnecessary when maintaining only a single version for production. The Main branch is always the latest stable version released, and it is tagged with the new version number each time the Develop branch is merged into it. Shared branches are never rebased or force-pushed. See CONTRIBUTING.md for how to contribute, and RELEASING.md for branching, versioning, and releases.
You are welcome to fork the project and then offer your changes back using a pull request.