SendGridTools

0.5.2-preview0006

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.5.2-preview0006 -AllowPrerelease

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

Install-PSResource -Name SendGridTools -Version 0.5.2-preview0006 -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.5.2-preview0006] - 2026-11-19

### Fixed

- `New-SGBrandedDomainLink -Default:$false` no longer asks for a default link and does not set one; before, the switch counted when it was given at all, also with `$false`. The question now goes through the same helper as in `New-SGAuthenticatedDomain`. With the switch set, or without it, the request is as before.
- `New-SGAuthenticatedDomain` no longer calls SendGrid when PowerShell binds its parameters. `-IPAddress` is an ordinary parameter with the same name and type; Tab completes the addresses of the account, and SendGrid decides whether an address belongs to the account. Before, a value outside the account's list failed at binding. `Get-Command -Syntax`, `Get-Help` and `New-SGCombinedDomain` no longer need a session for it. A third positional argument still binds to `-Username`.
- `Confirm-SGAuthenticatedDomain`, `Confirm-SGBrandedDomainLink`, `Remove-SGApiKey`, `Remove-SGAuthenticatedDomain`, `Remove-SGBrandedDomainLink`, `Set-SGApiKey`, `Set-SGAuthenticatedDomain` and `Set-SGBrandedDomainLink` accept an id as a 64-bit integer from the pipeline, as `Get-SGAuthenticatedDomain` gives it in PowerShell 7. Before, the command failed with "Failed to convert InputObject to Id.". Other ids work as before.
- `New-SGAuthenticatedDomain`, `New-SGBrandedDomainLink`, `Confirm-SGAuthenticatedDomain`, `Confirm-SGBrandedDomainLink`, `Remove-SGAuthenticatedDomain` and `Remove-SGBrandedDomainLink` write their own informational notes (which subdomain is used, that a domain is already validated, and the reminder to remove DNS records) only with `-Verbose` or when `$VerbosePreference` asks for it. Before, these notes were shown without it.
- A failed request is passed on inside the module as the error record it was raised with, instead of as a new error that held only the message text. The record keeps where the error was raised and, for an error raised while the answer is read (for example an error body that is not JSON), its type and inner exception. An HTTP error is still turned into a text by the session, as before, and the error message a command shows is the same.
- An answer with several entries in `errors` now raises one error whose text is their `message` texts in order, separated by `; `; an entry without a message is left out. Before, the texts were joined with a space. With one entry the text is as before.
- `Add-SGGlobalSuppression`, `Remove-SGBlock`, `Remove-SGBounce`, `Remove-SGInvalidEmail` and `Remove-SGSpamReport` show the reason in their error message when a request fails. Before, the message repeated the email address where the reason should be.
- `Get-SGEmailActivity -Verbose` no longer writes the filter values or the date values in its filter notes. They name the property, the operator and the logical operator of each condition. The two notes about the request itself ("Starting process" and "Successfully invoked") name the request path without its query, for every command, so they no longer hold the filter values either. The query that is sent is unchanged, and `-WhatIf` shows the request with its query as before.
- `Connect-SendGrid` writes "Connection to SendGrid established." and its two refresh notes, and a request with an empty answer writes "Successfully invoked", only with `-Verbose` or when `$VerbosePreference` asks for it. Before, these lines were shown without it. The texts are unchanged.
- A command called with `-Confirm`, or with `$ConfirmPreference` set to `Low` or `Medium`, is no longer asked again by the request it sends or for each property name of the answer. Before, the request asked a second time and every property name of the answer was a question of its own.
- `Set-SGApiKey -Verbose` names the key in "Updating key"; before, the name was empty.
- `Remove-SGGlobalSuppression` encodes the email address in the request path, so an address with `+`, `#`, `?` or `/` removes that address. Before, such a character could change what was requested. `-WhatIf` and the error message show the address as given.
- A request with an empty answer writes "Successfully invoked" once with `-Verbose`. Before, it was written once for every empty object in the answer and once more at the end.
- A time that SendGrid sends as Unix seconds is a `DateTime` in both PowerShell 7 and Windows PowerShell 5.1. It holds for a whole number in a property whose name contains `valid`, `created`, `updated` or `lastat`, and now also for a name that ends in `_at`, such as `assigned_at` (`AssignedAt` from `Get-SGIPAddress`). Before, Windows PowerShell 5.1 returned every such value as a number, and PowerShell 7 returned a value whose name only ends in `_at` as a number. A list of such numbers is a list of dates in the same order; before, PowerShell 7 returned only the first one, as a single date. A Boolean, a decimal number, a text and an empty value are as before.
- `Get-SGEmailActivity -Property TemplateId` and `-Property TemplateName` no longer fail when PowerShell binds their parameters. `-Value` is an ordinary list of texts for them, and SendGrid decides whether the value exists. Before, binding called a command that the module does not have. The filter for `TemplateName` still has no field name.
- `Get-SGEmailActivity -Filter` with `-Between` sends the same dates under every culture. Before, a culture that writes the day before the month, such as en-GB or tr-TR, swapped day and month or failed. Under en-US the query is unchanged.
- A `date` field in an answer is read the same under every culture, for every command. Before, a culture with another calendar, such as th-TH, gave another year. Under en-US the dates are unchanged.
- Property names in the output are the same under every culture, for every command. Before, the Turkish culture gave `id`, `ip` and `is_enabled` a dotted capital I and no value. Under en-US the names are unchanged.
- The build's dependency resolution (`Resolve-Dependency.ps1`) stops with an error that names `Microsoft.PowerShell.PSResourceGet` and the cause when PSResourceGet cannot be downloaded, unpacked or imported. Before, a failed download wrote a warning and went on with the legacy PowerShellGet path, which could install the NuGet package provider for the current user and mark `PSGallery` as trusted for the run, and a failed unpack or import wrote errors and went on as if PSResourceGet were in place. When the PSResourceGet bootstrap succeeds the resolution is as before.
- `Confirm-SGAuthenticatedDomain`, `Confirm-SGBrandedDomainLink`, `Remove-SGApiKey`, `Remove-SGAuthenticatedDomain`, `Remove-SGBrandedDomainLink`, `Set-SGApiKey` and `Set-SGAuthenticatedDomainToSubUser` ask once with `-Confirm`, for the object they change. Before, the read of that object through `Get-SGApiKey`, `Get-SGAuthenticatedDomain` or `Get-SGBrandedDomainLink` asked as well. With `-WhatIf` they read the object and write one line for it; before, the read was skipped and wrote a line of its own, so the command's line lacked the name, for example in `Remove-SGApiKey`. `Confirm-SGAuthenticatedDomain`, `Confirm-SGBrandedDomainLink`, `Remove-SGAuthenticatedDomain` and `Remove-SGBrandedDomainLink` also return the object they read under `-WhatIf`, as they do without it. The three `Get-SG*` commands are unchanged.
- `Remove-SGBlock`, `Remove-SGBounce`, `Remove-SGInvalidEmail` and `Remove-SGSpamReport` encode the email address in the request path, as `Remove-SGGlobalSuppression` does, so an address with `+`, `#`, `?` or `/` removes that address. Before, such a character could change what was requested. `-WhatIf` and the error message show the address as given. `Remove-SGBlock` says block in its `-WhatIf` and `-Confirm` text and in its error messages; before, it said bounce.
- A time value becomes a `DateTime` only when it is a whole number within the 32-bit range, and a list of them a list of dates only when every element is; any other value is returned as SendGrid sends it. Before, a whole number outside that range under a name that contains `valid`, `created`, `updated` or `lastat` made the command fail. `Get-SGIPAddress -IncludeRegion` returns `AddedAt` and `UpdatedAt` as dates by the same rule, as `Get-SGIPAddress` does without the switch; before, they were Unix seconds.

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... 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... (current version) 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 less