SendGridTools.psd1
|
# # Module manifest for module 'SendGridTools' # # Generated by: Philip Haglund # # Generated on: 2023-06-21 # @{ # Script module or binary module file associated with this manifest. RootModule = 'SendGridTools.psm1' # Version number of this module. ModuleVersion = '0.6.0' # Supported PSEditions # CompatiblePSEditions = @() # ID used to uniquely identify this module GUID = 'c30e3731-0195-4b7f-bc99-c05a17965d28' # Author of this module Author = 'Philip Haglund' # Company or vendor of this module CompanyName = 'Omnicit' # Copyright statement for this module Copyright = '(c) Philip Haglund. All rights reserved.' # Description of the functionality provided by this module Description = 'Manage SendGrid using its API with PowerShell functions and wrappers.' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '5.1' # Name of the PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module # RequiredModules = @() # Assemblies that must be loaded prior to importing this module # RequiredAssemblies = @() # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module FormatsToProcess = @('SendGridTools.format.ps1xml') # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = @('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') # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = '*' # Variables to export from this module VariablesToExport = '*' # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = @('ConvertTo-NameTitle','Add-SGSuppression','Add-SGAddressToSuppression','Connect-SG','Disconnect-SG','Get-SGActivity','Send-SGMessage','Send-SGMail') # DSC resources to export from this module # DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ Prerelease = 'preview0008' # Tags applied to this module. These help with module discovery in online galleries. Tags = @('SendGrid', 'Mail', 'PSEdition_Core', 'PSEdition_Desktop') # A URL to the license for this module. LicenseUri = 'https://github.com/PhilipHaglund/SendGridTools/blob/main/LICENSE' # A URL to the main website for this project. ProjectUri = 'https://github.com/PhilipHaglund/SendGridTools/' # A URL to an icon representing this module. IconUri = 'https://raw.githubusercontent.com/PhilipHaglund/SendGridTools/main/SendGridTools.png' # ReleaseNotes of this module ReleaseNotes = '## [0.6.0-preview0008] - 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. 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. - `Send-SGMailMessage` now sends `-BatchId` as `batch_id` and `-Unsubscribe` as `asm` (`group_id`, and `groups_to_display` when it has groups), and stops with "Unsubscribe needs a GroupId greater than 0." before any request for a `GroupId` of 0 or less. Before, both parameters were accepted and left out of the request without an error. Without them the request is unchanged. - `Send-SGMailMessage -Categories` takes 1 to 10 names of 1 to 255 characters each; an empty list is refused at binding. Before, each name could be at most 10 characters, the number of names was not limited, so SendGrid refused more than 10 names, and an empty list was accepted and left out of the request. - `Get-SGSubuser` refuses an empty `-Username` at binding, also from the pipeline, and sends no request for it; `-Limit` takes 1 or more and `-Offset` 0 or more, and `-Offset 0` is sent. With `-Username`, `-Limit` and `-Offset` are not sent, and one warning per run says that they apply only without `-Username`. Before, an empty `-Username` was skipped without an error, so every Subuser was given out, also to a command further on in the pipeline; `-Limit 0` and `-Offset 0` were skipped, a negative value was sent as given, and `-Limit` and `-Offset` were sent with `-Username`, so SendGrid''s longer names that start with the value could hide the equal name. Without these parameters the request is unchanged. - `Get-SGSubuser -Username` names the username in `-WhatIf` and `-Confirm` as `Subuser ''<name>''`, and the help says that the list includes disabled Subusers. Before, the target was `Subusers` also with `-Username`, and the help said that disabled Subusers are not listed. Without `-Username` the target is `Subusers`, as before. - `Get-SGApiKey -ApiKeyId`, `Get-SGTeammate -Username`, `Get-SGAlert -AlertId` and `-EmailAddress` in `Get-SGBlock`, `Get-SGBounce`, `Get-SGGlobalSuppression`, `Get-SGInvalidEmail` and `Get-SGSpamReport` refuse an empty value at binding, also from the pipeline, and send no request for it. Before, `$null`, an empty list, and for the first three also `''''` or a list with only an empty text, were skipped without an error, so the whole list was given out, also to a command further on in the pipeline. With a value, or without the parameter, the request is unchanged. - The help for `Send-SGMailMessage -Unsubscribe` shows a hashtable, `-Unsubscribe @{ GroupId = 123; GroupsToDisplay = 123, 124 }`, in the parameter help, in a new example and in the comment at the parameter, and says that PowerShell converts it to `SGASM` and that the type `[SGASM]` does not exist after only `Import-Module`. Before, the help built the object with `[SGASM]::new(123)`, which fails after only `Import-Module` with "Unable to find type". The help for `-BatchId` says "allows you to include" and that SendGrid refuses an id that is not a batch in the account, also in sandbox mode, and then sends nothing. Before, it said "allows you include" and did not say it. The request is unchanged. ' # Prerelease string of this module # Prerelease = '' # Flag to indicate whether the module requires explicit user acceptance for install/update/save # RequireLicenseAcceptance = $false # External dependent modules of this module # ExternalModuleDependencies = @() } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' } |