[GH-ISSUE #136] Outlook add-in does not auto-add signatures and logs "SIGNATURE_HOSTS_AND_PLATFORMS does not include ..." #63

Closed
opened 2026-02-27 20:31:04 +03:00 by kerem · 2 comments
Owner

Originally created by @GruberMarkus on GitHub (Jul 11, 2025).
Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/136

Originally assigned to: @GruberMarkus on GitHub.

Issue happens in the latest release

  • I confirm that the issue happens in the latest release of Set-OutlookSignatures

Previously solved issues and documentation

  • I have searched through issues, discussions and documentation, but have not found an answer to my issue

Code of Conduct

  • I agree to follow this project's Code of Conduct

What happened?

Issue

The Outlook add-in will not automatically add signatures to emails and appointments. In the log output you see

Set-OutlookSignatures: SIGNATURE_HOSTS_AND_PLATFORMS:
Set-OutlookSignatures: APPOINTMENT_HOSTS_AND_PLATFORMS:

instead of (default values, your values may be different)

Set-OutlookSignatures: SIGNATURE_HOSTS_AND_PLATFORMS: outlookandroid_on_android,outlookios_on_ios
Set-OutlookSignatures: APPOINTMENT_HOSTS_AND_PLATFORMS: newoutlookwindows_on_officeonline,outlook_on_mac,outlookwebapp_on_officeonline

.

In consequence, this leads to

Set-OutlookSignatures: SIGNATURE_HOSTS_AND_PLATFORMS does not include <your host and platform>

.

Reason

This happens when you use PowerShell 5.1 to run 'run_before_deployment.ps1'. PowerShell 5.1 has a bug in ConvertTo-Json, which does not correctly convert arrays to JSON when they are passed via the InputObject parameter instead of the pipeline.

Solutions and workaround

There are two solutions available, both being described below.

Whichever solution you choose: You need to increase the version number of the Outlook add-in and re-deploy it so that your Outlook clients can pick up the new code.
For details about this, read the chapters 'Configuration and deployment to the web server' and 'Deployment to mailboxes' of the Outlook add-in documentation.

Solution B will be part of the next version, which does not yet have a release date. This issue will stay open until a version containing the fix is available.

Solution A: Use PowerShell 7 to run 'run_before_deployment.ps1'

Run the 'run_before_deployment.ps1' script with the current release of PowerShell 7 instead of PowerShell 5.1.

The current release of PowerShell 7 correctly converts arrays to JSON, no matter if passed via the pipeline or the InputObject parameter.

Solution B: Modify the 'run_before_deployment.ps1' script

If you want to keep using PowerShell 5.1 to run the 'run_before_deployment.ps1' script, change the line

$ProductionValues[$_] = (ConvertTo-Json -InputObject $ProductionValues[$_] -Compress).ToLower() -replace '"', '\"'

to

$ProductionValues[$_] = ($ProductionValues[$_] | ConvertTo-Json -Compress).ToLower() -replace '"', '\"'

Partial workaround for end users

On Outlook editions supporting taskpanes (so not on Outlook for iOS and Outlook for Android when writing mails), you can open the taskpance, check 'Ignore host and platform' and click on 'Set selected signature'.

This partial workaround is not recommended as it does not work on mobile platforms, requires communication to end users and manual effort for each new mail written. It is only listed here for completeness.

Originally created by @GruberMarkus on GitHub (Jul 11, 2025). Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/136 Originally assigned to: @GruberMarkus on GitHub. ### Issue happens in the latest release - [x] I confirm that the issue happens in the latest release of Set-OutlookSignatures ### Previously solved issues and documentation - [x] I have searched through issues, discussions and documentation, but have not found an answer to my issue ### Code of Conduct - [x] I agree to follow this project's Code of Conduct ### What happened? # Issue The Outlook add-in will not automatically add signatures to emails and appointments. In the log output you see ``` Set-OutlookSignatures: SIGNATURE_HOSTS_AND_PLATFORMS: Set-OutlookSignatures: APPOINTMENT_HOSTS_AND_PLATFORMS: ``` instead of (default values, your values may be different) ``` Set-OutlookSignatures: SIGNATURE_HOSTS_AND_PLATFORMS: outlookandroid_on_android,outlookios_on_ios Set-OutlookSignatures: APPOINTMENT_HOSTS_AND_PLATFORMS: newoutlookwindows_on_officeonline,outlook_on_mac,outlookwebapp_on_officeonline ``` . In consequence, this leads to ``` Set-OutlookSignatures: SIGNATURE_HOSTS_AND_PLATFORMS does not include <your host and platform> ``` . # Reason This happens when you use PowerShell 5.1 to run 'run_before_deployment.ps1'. PowerShell 5.1 has a bug in ConvertTo-Json, which does not correctly convert arrays to JSON when they are passed via the InputObject parameter instead of the pipeline. # Solutions and workaround There are two solutions available, both being described below. Whichever solution you choose: You need to increase the version number of the Outlook add-in and re-deploy it so that your Outlook clients can pick up the new code. For details about this, read the chapters 'Configuration and deployment to the web server' and 'Deployment to mailboxes' of the [Outlook add-in documentation](https://set-outlooksignatures.com/outlookaddin). Solution B will be part of the next version, which does not yet have a release date. This issue will stay open until a version containing the fix is available. ## Solution A: Use PowerShell 7 to run 'run_before_deployment.ps1' Run the 'run_before_deployment.ps1' script with the current release of PowerShell 7 instead of PowerShell 5.1. The current release of PowerShell 7 correctly converts arrays to JSON, no matter if passed via the pipeline or the InputObject parameter. ## Solution B: Modify the 'run_before_deployment.ps1' script If you want to keep using PowerShell 5.1 to run the 'run_before_deployment.ps1' script, change the line ``` $ProductionValues[$_] = (ConvertTo-Json -InputObject $ProductionValues[$_] -Compress).ToLower() -replace '"', '\"' ``` to ``` $ProductionValues[$_] = ($ProductionValues[$_] | ConvertTo-Json -Compress).ToLower() -replace '"', '\"' ``` ## Partial workaround for end users On Outlook editions supporting taskpanes (so not on Outlook for iOS and Outlook for Android when writing mails), you can open the taskpance, check 'Ignore host and platform' and click on 'Set selected signature'. This partial workaround is not recommended as it does not work on mobile platforms, requires communication to end users and manual effort for each new mail written. It is only listed here for completeness.
kerem 2026-02-27 20:31:04 +03:00
Author
Owner

@GruberMarkus commented on GitHub (Jul 16, 2025):

The next release of Set-OutlookSignatures will not use Solution B, but the more generic Solution C:

Solution C: Remove unnecessary ETS type data associated with arrays in Windows PowerShell

Find the line

if ($psISE) {

and change it to

# Remove unnecessary ETS type data associated with arrays in Windows PowerShell
Remove-TypeData System.Array -ErrorAction SilentlyContinue

if ($psISE) {

for a generic solution that works in the whole PowerShell session.

For details, see this comment on StackOverflow.

<!-- gh-comment-id:3079398372 --> @GruberMarkus commented on GitHub (Jul 16, 2025): The next release of Set-OutlookSignatures will not use Solution B, but the more generic Solution C: # Solution C: Remove unnecessary ETS type data associated with arrays in Windows PowerShell Find the line ``` if ($psISE) { ``` and change it to ``` # Remove unnecessary ETS type data associated with arrays in Windows PowerShell Remove-TypeData System.Array -ErrorAction SilentlyContinue if ($psISE) { ``` for a generic solution that works in the whole PowerShell session. For details, see [this comment on StackOverflow](https://stackoverflow.com/questions/20848507/why-does-powershell-give-different-result-in-one-liner-than-two-liner-when-conve/38212718#38212718).
Author
Owner

@GruberMarkus commented on GitHub (Jul 18, 2025):

Version 4.20.3 had been released. As announced in this issue it integrates solution C.

<!-- gh-comment-id:3087014834 --> @GruberMarkus commented on GitHub (Jul 18, 2025): Version 4.20.3 had been released. As announced in this issue it integrates solution C.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#63
No description provided.