SendGridTools

0.7.1-preview0004

Manage SendGrid using its API with PowerShell functions and wrappers.

Minimum PowerShell version

5.1

This is a prerelease version of SendGridTools.
There is a newer prerelease version of this module available.
See the version list below for details.

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name SendGridTools -RequiredVersion 0.7.1-preview0004 -AllowPrerelease

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name SendGridTools -Version 0.7.1-preview0004 -Prerelease

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) Philip Haglund. All rights reserved.

Package Details

Author(s)

  • Philip Haglund

Tags

SendGrid Mail

Functions

Add-SGEmailAddressToSuppressionGroup Add-SGGlobalSuppression Confirm-SGAuthenticatedDomain Confirm-SGBrandedDomainLink Connect-SendGrid Disable-SGSubuser Disconnect-SendGrid Enable-SGSubuser Get-SGAddressWhitelistSetting Get-SGAlert Get-SGApiKey Get-SGAuthenticatedDomain Get-SGBlock Get-SGBounce Get-SGBounceByClassification Get-SGBouncePurgeSetting Get-SGBrandedDomainLink Get-SGDesign Get-SGEmailActivity Get-SGEnforcedTls Get-SGForwardBounceSetting Get-SGForwardSpamSetting Get-SGGlobalSuppression Get-SGInvalidEmail Get-SGIPAddress Get-SGMailSetting Get-SGPermissionScopes Get-SGSpamReport Get-SGSubuser Get-SGSuppression Get-SGSuppressionGroup Get-SGTeammate Invoke-SGCommand New-SGAlert New-SGApiKey New-SGAuthenticatedDomain New-SGBrandedDomainLink New-SGCombinedDomain New-SGSubuser New-SGSuppressionGroup Remove-SGAlert Remove-SGApiKey Remove-SGAuthenticatedDomain Remove-SGBlock Remove-SGBounce Remove-SGBrandedDomainLink Remove-SGGlobalSuppression Remove-SGInvalidEmail Remove-SGSpamReport Remove-SGSubuser Remove-SGSuppressionGroup Send-SGMailMessage Set-SGAddressWhitelistSetting Set-SGAlert Set-SGApiKey Set-SGAuthenticatedDomain Set-SGAuthenticatedDomainToSubUser Set-SGBouncePurgeSetting Set-SGBrandedDomainLink Set-SGEnforcedTls Set-SGForwardBounceSetting Set-SGForwardSpamSetting Set-SGSuppressionGroup

PSEditions

Core Desktop

Dependencies

This module has no dependencies.

Release Notes

## [0.7.1-preview0004] - 2026-11-21

### Changed

- After a session has expired, the following commands say `The SendGrid session has expired. Run Connect-SendGrid -Force to reconnect.`, until `Connect-SendGrid` or `Disconnect-SendGrid` is run. A failed `Connect-SendGrid` also removes the session. Before, only the first command said so; the following commands said `You must call the Connect-SendGrid cmdlet before calling any other cmdlets.`, as if `Connect-SendGrid` had never been run.

### Fixed

- `Set-SGSuppressionGroup`, `Set-SGAuthenticatedDomain`, `Set-SGBrandedDomainLink` and `Set-SGAlert` refuse an update without fields: `Nothing to update for <what> <id>. Specify <parameters>.` and send no request. The first three refuse it also with `-WhatIf`. The refusal ends the pipeline at the first such object, so with `Set-SGAlert` the alerts after it are not updated. Before, each sent a PATCH request with an empty body `{}` for every id.
- In Windows PowerShell 5.1 an answer with a JSON content type and no character set is decoded as UTF-8, so letters such as the Swedish a with ring, the euro sign and emoji come back right. Before, such an answer was decoded as ISO-8859-1, and each of these characters came back as two to four wrong characters. A named character set is followed as before. Other types without one, such as `text/plain`, are still decoded as ISO-8859-1. PowerShell 7 is unchanged.
- Every request with a body is sent as UTF-8 with `Content-Type: application/json; charset=utf-8`, in both shells, so the euro sign and emoji reach SendGrid, for example in the subject, text and names of `Send-SGMailMessage`. Before, Windows PowerShell 5.1 sent the body as ISO-8859-1. The Swedish a with ring, a with diaeresis, o with diaeresis and e with acute went out as the single bytes `E5 E4 F6 E9`, which are not valid UTF-8, and the euro sign and emoji went out as `?`. Both shells sent `Content-Type: application/json` without a character set. Requests without a body are unchanged.
- `Remove-SGBlock`, `Remove-SGBounce`, `Remove-SGInvalidEmail` and `Remove-SGSpamReport` take a `[MailAddress]` from the pipeline and send only its address, as `Remove-SGGlobalSuppression` does. Before, they refused it with `Failed to convert InputObject to an email address.`
- `Send-SGMailMessage -Priority` is sent as the headers `X-Priority`, `Importance` and `Priority` (High `1`/`high`/`urgent`, Normal `3`/`normal`/`normal`, Low `5`/`low`/`non-urgent`). Before, it was sent as a top-level `priority` field, which SendGrid's Mail Send API does not have, so it had no effect.
- `Get-SGTeammate` without `-Username` reads every page (50 at a time). Before, it read one page, which SendGrid limits to 500 teammates.
- `Add-SGEmailAddressToSuppressionGroup` with one address sends it as a list. Before, SendGrid refused one address with `invalid json` (HTTP 400).
- `Get-SGEmailActivity` sends a whole number for `-Property AsmGroupId` and `Clicks` without quotes, and for `-Property AsmGroupName` it sends the group id found for the name without quotes. Before, SendGrid refused these filters with `operator = is incompatible with NUMBER, STRING` for one value and `operator IN is incompatible with NUMBER, STRING, STRING` for two (HTTP 400).
- `Set-SGAlert` updates an alert of type `usage_limit`. Before, it said `The alert with ID <id> is an unknown type. Create an issue on GitHub.` and sent nothing.

FileList

Version History

Version Downloads Last updated
0.7.2-previe... 6 11/21/2026
0.7.1 9 11/21/2026
0.7.1-previe... (current version) 5 11/21/2026
0.7.1-previe... 5 11/21/2026
0.7.1-previe... 5 11/21/2026
0.7.1-previe... 5 11/21/2026
0.7.0 9 11/21/2026
0.7.0-previe... 5 11/20/2026
0.7.0-previe... 4 11/20/2026
0.7.0-previe... 5 11/20/2026
0.7.0-previe... 5 11/20/2026
0.6.1-previe... 5 11/20/2026
0.6.0 12 11/20/2026
0.6.0-previe... 10 11/20/2026
0.6.0-previe... 6 11/20/2026
0.6.0-previe... 6 11/20/2026
0.6.0-previe... 5 11/20/2026
0.6.0-previe... 5 11/20/2026
0.6.0-previe... 5 11/20/2026
0.6.0-previe... 5 11/20/2026
0.6.0-previe... 6 11/20/2026
0.5.3-previe... 5 11/19/2026
0.5.3-previe... 4 11/19/2026
0.5.2 12 11/19/2026
0.5.2-previe... 5 11/19/2026
0.5.2-previe... 5 11/19/2026
0.5.2-previe... 5 11/19/2026
0.5.2-previe... 5 11/19/2026
0.5.2-previe... 6 11/19/2026
0.5.2-previe... 5 11/19/2026
0.5.1 10 11/19/2026
0.5.1-previe... 6 11/18/2026
0.5.1-previe... 5 11/18/2026
0.5.1-previe... 4 11/18/2026
0.5.1-previe... 6 11/18/2026
0.5.1-previe... 5 11/18/2026
0.5.0 7 11/18/2026
0.5.0-previe... 5 11/18/2026
0.5.0-previe... 5 11/18/2026
0.5.0-previe... 6 11/18/2026
0.4.9-previe... 6 11/18/2026
0.4.9-previe... 8 11/18/2026
0.4.8 8 11/18/2026
0.4.8-previe... 4 11/18/2026
0.4.8-previe... 5 11/17/2026
0.4.8-previe... 4 11/17/2026
0.4.8-previe... 6 11/17/2026
0.4.8-previe... 4 11/17/2026
0.4.7 513 11/8/2025
0.4.6 1,144 8/15/2024
0.4.5 8 8/15/2024
0.4.4 16 8/12/2024
0.4.3 9 8/12/2024
0.4.2 8 8/12/2024
0.4.1 6 8/12/2024
0.4.1-previe... 5 8/12/2024
0.4.0-previe... 7 2/2/2024
0.3.0 326 1/25/2024
0.2.0-previe... 8 1/25/2024
Show more