SendGridTools
0.5.0-preview0003
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.0-preview0003] - 2026-11-18
### Added
- `Connect-SendGrid -Region Global|EU` connects to SendGrid's EU host `api.eu.sendgrid.com` (issue #3), and `-BaseUri` to a given https base URI with `/v3` added when missing; a new session without them uses the global host, as before, and an existing session is refreshed on its own host. `-Region` or `-BaseUri` naming another host than the current session starts a new session (it asks for the key when `-Credential` is not given); if that connection fails, no session is left.
- `Get-SGSubuser -IncludeRegion` adds the region of each subuser as `Region`, and `-Region All|Global|EU` returns only the subusers in that region (issue #4). Both apply to the list only; with `-Username` they send nothing extra and warn, because SendGrid does not report the region of a single subuser. `Get-SGIPAddress -IncludeRegion` reads the IP Address Management API (`/v3/send_ips/ips`), which has other properties than `/v3/ips`, among them `Region`, and reads every page of it. Without the new parameters both commands send the same request and return the same output as before.
- `Get-SGEnforcedTls` reads the Enforced TLS settings of the account, or of a subuser with `-OnBehalfOf`, as `RequireTls`, `RequireValidCert` and `Version`, and `Set-SGEnforcedTls` changes them and sends only the settings given (issue #4). `Set-SGEnforcedTls` asks for confirmation, because the setting applies to all mail from the account: with `-RequireTls`, a recipient that does not support TLS does not get the mail.
- `Connect-SendGrid -ApiKey` takes the API key as a secure string, so a key from a vault or an environment variable needs no `PSCredential` (issue #4); it cannot be combined with `-Credential`. In a host that cannot prompt (a console host started with `-NonInteractive`, a Windows service, a scheduled task without a signed-in user, or a runspace without a user interface), `Connect-SendGrid` without `-Credential` or `-ApiKey` fails with an error that names both instead of asking for the key, and leaves an existing session as it was. An interactive host asks for the key as before. `-NonInteractive` counts only in the console host: a host with its own user interface (for example Visual Studio Code) asks for the key as before, and a remote session leaves the prompt to the client. On Linux and macOS only `-NonInteractive` is recognised (there .NET reports every process as user interactive), so start a cron or systemd job with `pwsh -NonInteractive` or pass `-ApiKey`.
### Fixed
- `Get-SGAuthenticatedDomain` and `Get-SGApiKey` return every authenticated domain and API key: they read the list page by page instead of taking only what one request returned, and `-DomainName` offers every domain. With no authenticated domains, `Get-SGAuthenticatedDomain` returns nothing instead of failing. The API key choices in `Get-SGEmailActivity` now include every key too.
- `Invoke-SGCommand` accepts a full URL on the session's host, global or EU, and refuses a URL to another host so the API key is never sent there; before, it recognised only the global host and removed `/v3/` anywhere in the path.
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... | 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... (current version) | 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 |