SendGridTools

0.6.0-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.6.0-preview0004 -AllowPrerelease

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

Install-PSResource -Name SendGridTools -Version 0.6.0-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.6.0-preview0004] - 2026-11-20

### Added

- `New-SGAuthenticatedDomain`, `New-SGBrandedDomainLink` and `New-SGApiKey` have a `-Force` switch. With `-Force` the question before `-Default` replaces the current default, or before a key with full access is created, is not asked, so a script without a console can do it. `-Force` does not change `-WhatIf` or `-Confirm`. Without `-Force` the commands ask as before.
- `Send-SGMailMessage` has a `-SandboxMode` switch. With it the message is sent to SendGrid in sandbox mode: SendGrid validates the request and answers without delivering the message. With `-SandboxMode` the target that `-WhatIf` and `-Confirm` name ends with ` in sandbox mode`. Without `-SandboxMode` the request and the target are unchanged.

### Fixed

- `Get-SGBlock`, `Get-SGBounce`, `Get-SGGlobalSuppression`, `Get-SGInvalidEmail` and `Get-SGSpamReport` with `-EmailAddress` now encode the address in the query, so an address with `+`, `#` or `&` asks for that address. Before, the address was sent as given: SendGrid read `+` as a space, and `#` or `&` cut or split the query. Without `-EmailAddress` the query is unchanged.
- `Disable-SGSubuser`, `Enable-SGSubuser`, `Remove-SGSubuser` and `Get-SGTeammate -Username` encode the username in the request path; a name without special characters gives the same path as before. `Get-SGTeammate -Username` now sends its request; before, it called the module's request function without its parameters, so in a console PowerShell asked for those parameters, and otherwise the command failed; no request for the username was sent. `Remove-SGSubuser` names the username in its question and in `-WhatIf`; before, the target was the word `Subuser`. The help for `-Username` in the three subuser commands says the username of the Subuser with the right verb; before, it said the ID (and "to enable" in `Disable-SGSubuser`).
- `Remove-SGBlock`, `Remove-SGBounce`, `Remove-SGInvalidEmail` and `Remove-SGSpamReport` stop with "InputObject has no Email property; pass an email address or an object with an Email property." for an object in the pipeline without a non-empty `Email`, and send nothing for it. Before, an object without `Email` sent a removal to the list's path without an address, and an object with an empty `Email` failed with a conversion error. Any other input that is not a text or such an object now gives "Failed to convert InputObject to an email address." instead of "Failed to convert InputObject to Id.". A text and an object with `Email` work as before.
- `Get-SGDesign` sends `-PageSize` as a plain number, encodes `-PageToken`, and sends `summary=true` for `-Summary` and `summary=false` for `-Summary:$false`. Before, `-PageSize` was sent with an extra `)`, which SendGrid refused, the token was sent as given, `-Summary` was sent as `True`, and `-Summary:$false` sent nothing, so all fields were never asked for. Without `-Summary` no value is sent, as before.
- `New-SGApiKey -FullAccessKey` honours `-WhatIf` and `-Confirm`: with `-WhatIf` it writes one line for the key, asks nothing and creates nothing; with `-Confirm` it asks for the key and then the question about full access. Before, the question about full access was asked also under `-WhatIf`, and `-Confirm` gave no question of its own. Without these switches it asks once, as before.
- `Get-SGEmailActivity` no longer calls SendGrid when PowerShell binds `-Value` for `-Property ApiKeyId`, `ApiKeyName`, `AsmGroupId`, `AsmGroupName` and `Teammate`, also in `Get-Command`, `Get-Help` and Tab. `-Value` is an ordinary list of texts and Tab completes the account's values. Names are turned into ids when the command runs, so two names give both ids, and an unknown name stops with "No API key named '`<name>`'." or "No unsubscribe group named '`<name>`'.". Before, a value outside the account's list failed at binding, binding failed without a connection, and two names gave no id, so an empty value was sent.
- `Get-SGEmailActivity -Property TemplateName` stops with "SendGrid cannot filter email activity by template name; use -Property TemplateId." and sends nothing. Before, a query without a field name was sent.
- `Get-SGSubuser -Username` now looks the username up with SendGrid's documented `username` filter on the list of Subusers and encodes it, so a name with `+`, `/`, `#`, `?`, `&` or a space asks for that name, and `-Limit` and `-Offset` are sent with it. Only a Subuser whose username equals the value, without regard to case, is given out; measured live, SendGrid's filter also returned a Subuser whose username only starts with the value. A name that does not exist gives no output and no error. Before, the name was put in the request path as given, a path that SendGrid does not document for reading (it answered for an existing name); a `#` dropped the rest of the name and `-Limit` and `-Offset`, and a name that does not exist stopped with "Subuser not found". The help for `-Username` in `Get-SGSubuser` and `New-SGSubuser` says the username; before, it said the ID. Without `-Username` the request is unchanged.

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