SendGridTools
0.5.1
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.5.1] - 2026-11-19
### Fixed
- A property whose value is an empty list is kept in the output, with the empty list as its value, instead of being dropped; for example `Get-SGIPAddress` now returns `Pools` for an IP address in no pool. A response whose only properties are empty lists now returns an object instead of the verbose line "Successfully invoked". An empty `errors` list still raises no error.
- `Connect-SendGrid -Credential` or `-ApiKey` on an existing session on the same host now uses the given key: it replaces the session's key, is verified against SendGrid and starts the one-hour lifetime again, and the host and region are kept. Before, the given key was ignored and the old key was refreshed. If the new key fails, no session is left. Without a given key a refresh is as before.
- `New-SGAuthenticatedDomain -DisableAutomaticSecurity:$false` and `-Default:$false` behave as if the switch were not given: SendGrid manages security and no default domain is asked for or set. Before, the switch counted when it was given at all, also with `$false`. With the switch set, or without it, the request is as before.
- `New-SGCombinedDomain -CustomDkimSelector` accepts exactly three letters or digits, as `New-SGAuthenticatedDomain` does. A shorter selector fails before any request; before, the authenticated domain failed while the branded link was still created.
- `Set-SGAddressWhitelistSetting`, `Set-SGBouncePurgeSetting`, `Set-SGForwardBounceSetting` and `Set-SGForwardSpamSetting` accept `-WhatIf` and `-Confirm`. They do not ask by default, and without the switches the request and output are as before.
- `Set-SGApiKey -Scopes` accepts a scope again (it failed at binding in both PowerShell 7 and Windows PowerShell 5.1), and `Get-Command -Syntax Set-SGApiKey` no longer fails in PowerShell 7. The scope names complete with Tab, as in `New-SGApiKey`, and SendGrid decides whether a scope is valid.
- The build's dependency resolution (`Resolve-Dependency.ps1`) now saves each build module through a function that tries `Save-PSResource` up to three times. Between attempts it writes a warning with the module name, the error type and the attempt number, and waits 5 seconds. After the third failure it fails with the last error, unchanged. A save that succeeds on the first attempt behaves as before. Before, one sporadic error from PSResourceGet during the save failed the whole job, and a re-run passed.
### Security
- Every request to SendGrid no longer follows an HTTP redirect, so the API key is never sent to the host a redirect points at. In PowerShell 7 every 3xx answer, and in Windows PowerShell 5.1 a 301 or 302 answer, raises an error that names only that host (`SendGrid answered with a redirect to <host>; the request was refused so that the API key is not sent there.`). In Windows PowerShell 5.1 another 3xx answer (300, 303, 304, 305, 307 or 308) is not followed either, but comes back as an empty answer instead of an error, because that version reports no status code. Without a redirect, requests, responses and error messages are as before.
- The publish job's step "Refuse a version the triggering ref does not call for" now refuses a stable tag on an older main commit (GitHub compares the commit to main as `behind`). A tag run publishes only when the tag points at main's tip. The run fails with `REFUSING TO PUBLISH.` before the Gallery key is used, and the tag is left where it is. Before, the step let such a tag through, and only the changelog guard stopped the run.
FileList
- SendGridTools.nuspec
- SendGridTools.psd1
- SendGridTools.psm1
- en-US\about_SendgridTools.help.txt
- SendGridTools.format.ps1xml
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... | 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 (current version) | 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 |