Repository navigation
Releases
1.1.1
Changed
- The sample configuration file
Templates/config_scriptmessage.jsonnow includes theMgDelegatedPermission_RequestFilesReadWritePermissionsetting, which requests permission to upload Teams chat attachments to OneDrive when using delegated permissions. Earlier versions already read this setting, so it can be added to an existing configuration file.
Fixed
Send-ScriptMessageno longer rejects recipients given as a one-item array holding a recipient object, such as a singleNameandAddressentry read from a JSON configuration file. When those were the only recipients, it failed with "Please provide at least one parameter value for any of the following: To, CC, or BCC" and sent nothing.Send-ScriptMessagenow sends Teams chat messages that have no attachments. A call using-Type Chatdelivered nothing and returned "Cannot index into a null array" in the result'sErrorproperty, unless the same call also sent mail or the chat included an attachment. BothOneOnOneandGroupchats were affected.- On Windows PowerShell 5.1,
Send-ScriptMessageno longer fails to send Teams chat messages that have an attachment. Such a send could deliver nothing and report "Unable to find type [System.Web.HttpUtility]" in the result'sErrorproperty. - In both PowerShell editions,
Send-ScriptMessagenow escapes spaces in chat attachment filenames correctly when uploading them. A filename containing a space was uploaded to a path holding a plus sign in place of each space. - Minor:
Send-ScriptMessagenow stops with that same error when the only recipients have blank addresses, such as an object or hashtable whoseAddressis empty, or a string of only spaces. - Minor:
Connect-ScriptMessageandSend-ScriptMessageno longer require theMicrosoft.Graph.Filesmodule whenMgPermissionTypeisApplication. IfMgDelegatedPermission_RequestFilesReadWritePermissionwas alsotrueand the module was not installed, they failed with "Please first install the following sub-modules" and nothing was sent. With delegated permissions, that setting still requires the module. - Minor: With
MgApp_AuthenticationTypeset toCertificateFile, the error reported when the certificate needs a password andMgApp_EncryptedCertificatePasswordis empty now names Microsoft Graph. - Minor: On Windows PowerShell 5.1, a configuration file saved as UTF-8 without a byte order mark is now read correctly when it contains non-ASCII characters, such as an accented letter in
MgApp_CertificateName.Get-ScriptMessageConfig,Connect-ScriptMessage, andSend-ScriptMessagesilently read those characters as different ones. This is how PowerShell 7'sSet-ContentandOut-Filesave a file. - Minor: On PowerShell 7, a configuration file saved in the Windows ANSI code page is now read correctly when it contains non-ASCII characters.
Get-ScriptMessageConfig,Connect-ScriptMessage, andSend-ScriptMessagesilently read those characters as replacement characters. This is how Windows PowerShell 5.1'sSet-Contentsaves a file. - Minor: A configuration file whose path contains square brackets, such as a folder named
Scripts [old], can now be used.Get-ScriptMessageConfig,Connect-ScriptMessage, andSend-ScriptMessagestopped with "Can't find the JSON configuration file" and sent nothing.
ScriptMessage 1.1.0
Latest Changelog: https://github.com/Sekers/ScriptMessage/blob/master/CHANGELOG.md
Fixes
- ScriptMessage now properly allows for for NULL in TO, CC, BCC parameters in Microsoft Graph.
- Reverted recently added code formatting that included Begin\End process blocks as the way they were implemented caused bugs.
- Catch if a Teams Chat attachments folder does not already exists in the user's OneDrive.
- The 'AllowableMessageTypes' Microsoft Graph configuration is now being applied properly.
Features
- Much better error handling with the Microsoft Graph service. Warnings and Errors are now collected and if one service type has an error the command will still process the other service type (when applicable).
- Get-ScriptMessageConfig can now optionally pull data for a specific service only. Returning all services configurations is still the default.
- Sending multiple attachments in a single email or chat now works with Microsoft Graph.
- Sending attachments with non-standard filenames (uploaded to the user's OneDrive) using Microsoft Graph Chat is now supported.
Other
- BREAKING CHANGE: Renamed the Microsoft Graph service from 'MgGraph' to 'MicrosoftGraph'. Please update your configuration files as needed.
- Changes made to only import necessary Microsoft Graph PowerShell modules.
Full Changelog: 1.0.8...1.1.0
ScriptMessage 1.0.8
Latest Changelog: https://github.com/Sekers/ScriptMessage/blob/master/CHANGELOG.md
Fixes
- Get-ScriptMessageContext will return common info (like service name) rather than NULL if nothing comes back from the service (e.g., if it's not connected).
Features
- BREAKING CHANGE: Updates to the return info when sending messages. This is to make the responses more consistent across various services going forward.
- New Function: Disconnect-ScriptMessage > Disconnects from the specified messaging service ahead of sending the message, if possible.
- Enabled support for Graph Module Chat (delegated permissions only since Graph does not support application permissions for chat).
- ScriptMessage now caches service context information. Use Get-ScriptMessageContext with the 'ReturnCachedContext' parameter to have the cmdlet return the cached context information (if it exists to) reduce API calls.
- Attachments are now supported in messages.
Other
- README and built-in help updates.
- Added a few warning messages when using unsupported actions for the Microsoft Graph SDK.
Full Changelog: 1.0.7...1.0.8
ScriptMessage 1.0.7
Latest Changelog: https://github.com/Sekers/ScriptMessage/blob/master/CHANGELOG.md
Features
- New messaging class "MessageServiceType" and corresponding parameters for the Send-ScriptMessage Cmdlet to allow multiple/combined service & type parameters in one call.
Other
- Results returned from Send-ScriptMessage has recipients adjusted from Hashtables to PSCustomObjects. This better handles collections (arrays) of addresses than hashtables being returned. Originally it was hashtables to mimic what Graph uses but that's not great for our purpose.
Full Changelog: 1.0.6...1.0.7
ScriptMessage 1.0.6
Latest Changelog: https://github.com/Sekers/ScriptMessage/blob/master/CHANGELOG.md
Fixes
- Support for Client Secret authentication in Microsoft Graph 2.x and newer.
Features
- Added in an "AllowableMessageTypes" configuration setting for specific services to configure which types of messaging (Mail, Chat, etc.) are available for use with those services.
Other
- BREAKING CHANGE: Removed support for Microsoft Graph SDK version 1.x when using Client Secret authentication. Use version 2.x of the SDK or newer.
- Removed Graph SDK beta support since the way beta works has been changed by Microsoft and supporting it adds unnecessary complexity.
- Adjusted code formatting to include Begin\End process blocks to better accommodate future code updates.
- Minor code adjustments and spelling fixes to assist with debugging.
Full Changelog: 1.0.5...1.0.6
ScriptMessage 1.0.5
Latest Changelog: https://github.com/Sekers/ScriptMessage/blob/master/CHANGELOG.md
Features
- Added in an "All" recipients field when returning message send results, for convenience.
Full Changelog: 1.0.4...1.0.5
ScriptMessage 1.0.4
Latest Changelog: https://github.com/Sekers/ScriptMessage/blob/master/CHANGELOG.md
Fixes
- Renamed 'Sender' parameters & variables to 'SenderId' since 'Sender' is an automatic variable that is built into PowerShell and assigning to it might have undesired side effects in some circumstances.
Full Changelog: 1.0.3...1.0.4
ScriptMessage 1.0.3
Latest Changelog: https://github.com/Sekers/ScriptMessage/blob/master/CHANGELOG.md
Features
- Added an optional message type parameter to 'Send-ScriptMessage' to differentiate types of messages (chat, mail, etc.) for message services that support multiple kinds of messages. Defaults to 'Mail' if not specified.
Full Changelog: 1.0.2...1.0.3
ScriptMessage 1.0.2
Latest Changelog: https://github.com/Sekers/ScriptMessage/blob/master/CHANGELOG.md
Fixes
- Resolved issue with an internal function where a Microsoft Graph recipient returns empty when a recipient is inside an array of arrays.
Full Changelog: 1.0.1...1.0.2
ScriptMessage 1.0.1
Latest Changelog: https://github.com/Sekers/ScriptMessage/blob/master/CHANGELOG.md
Fixes
- Removed default command prefix leftover from initial testing.
Full Changelog: 1.0.0...1.0.1