SendGridTools
0.7.0-preview0002
Manage SendGrid using its API with PowerShell functions and wrappers.
Minimum PowerShell version
5.1
See the version list below for details.
Installation Options
Owners
Copyright
(c) Philip Haglund. All rights reserved.
Package Details
Author(s)
- Philip Haglund
Tags
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
Dependencies
This module has no dependencies.
Release Notes
## [0.7.0-preview0002] - 2026-11-20
### Added
- Every changed command error, `Disconnect-SendGrid` included, keeps the caught exception in `$_.Exception.InnerException`, also when SendGrid did not answer (for example a name lookup). When SendGrid answered, the HTTP status is an integer in `$_.Exception.Data['StatusCode']` and SendGrid's errors are in `$_.Exception.Data['SendGridErrors']`, a list of objects with `Field` and `Message`. Before, the error held only the text: no inner exception and no `Data`. The text before `SendGrid Error`, the error id and the type are unchanged. Callers may notice that `$_.Exception.GetBaseException()` now returns the original exception from `Invoke-RestMethod` instead of the command's error, and that `$_.Exception.ToString()` includes the inner exceptions.
### Changed
- SendGrid's error text names the HTTP status and the field: `SendGrid Error (HTTP <status>): "<field>: <message>, ..."`, where the field is left out when SendGrid gives none. `Connect-SendGrid` shows `Unable to connect to SendGrid. Error detail: SendGrid Error (HTTP <status>): "..."`. Before, the text was `SendGrid Error: "<first message>"` without status or field, and further messages were dropped; now every message is shown, in SendGrid's order. Before, also `Connect-SendGrid` repeated `Unable to connect to SendGrid.` inside the detail. Without an HTTP answer, for example a name lookup or a timeout, the texts are unchanged.
### Fixed
- In Windows PowerShell 5.1 every command refuses an HTTP redirect with 300, 303, 304, 305, 307 or 308 the way it refuses 301 and 302: `SendGrid answered with a redirect to <host>; the request was refused so that the API key is not sent there.` Before, Windows PowerShell 5.1 gave an empty or ordinary result for these answers, and `Connect-SendGrid` said that the session was connected. PowerShell 7 already refused them, and every other answer gives the same result as before.
- An HTTP error whose body is not JSON, or has no errors, gives `SendGrid Error (HTTP <status>).` followed by the original exception text. Before, the JSON parse error reached the user ("Conversion from JSON failed" in PowerShell 7, "Invalid JSON primitive" in Windows PowerShell 5.1).
- `Disconnect-SendGrid` writes `Unable to disconnect from SendGrid.` followed by the cause, still as a non-terminating error. Before, it wrote the text of a script block, `{ $_.Exception.Message }`, instead of the cause.
FileList
- SendGridTools.nuspec
- SendGridTools.format.ps1xml
- SendGridTools.psm1
- en-US\about_SendgridTools.help.txt
- SendGridTools.psd1
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... | 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... (current version) | 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 |