Diese Seite ist noch nicht auf Deutsch verfΓΌgbar. Sie sehen bis dahin die englische Version.

Architecture, requirements, usage

How it works, what it needs, and how to use it

Why parameters are in a separate document: There are many available parameters, default values are chosen wisely, and custom values usually do not change over the years.

πŸ”—Architecture considerations

Most companies choose the same default setup:

  • Primary device (managed): Where users do most daily email work.
  • Secondary devices (often managed, sometimes unmanaged): Phones, tablets, occasional laptops, VDI sessions, or private devices.
πŸ’‘

Recommended default pattern

Client mode on the primary device keeps signatures and OOF replies up to date without central compute.

Add the Outlook add-in to make signatures available on secondary devices...

🏒

When central creation is better

Sometimes you cannot or do not want to run Set-OutlookSignatures in the security context of the logged-on user...

πŸ”—Step 1: Create signatures and out-of-office replies

Set-OutlookSignatures comes with client mode, the Benefactor Circle add-on adds SimulateAndDeploy mode.

Client mode SimulateAndDeploy
Advantages Uses idle resources on end user devices (Linux, Windows, macOS). Runs within the security context of the logged-on user. Is typically run more often, usually every two hours or at every log-on. Users do not need a primary device that is managed and runs Linux, macOS or Windows. Software or at least configuration must only be deployed to involved central systems.
Disadvantages End users must log on to a device (Linux, Windows, macOS), not just to Outlook. The primary device of each user must be managed and run Windows, Linux or macOS. Software or at least configuration must be deployed to many decentral systems. Uses one or more central systems, which need appropriate resources. Runs within the security context of a service account requiring (temporary) full access to all user mailboxes. Is typically run less frequent, usually once a day or less often. Can only see and influence the configuration of Outlook for the web, reducing the feature set to what is possible without local Outlook state.
Recommended for Users logging on to a primary device that is managed and runs Linux, Windows or macOS. Scenarios where you cannot or do not want to run Set-OutlookSignatures in the context of the logged-on user (shared devices, Outlook for the web only, mobile-only, unmanaged BYOD, etc.).

 

With the Benefactor Circle add-on, both modes can set out-of-office replies for internal and external recipients and also deploy signatures for mailboxes (and other Exchange recipient objects) the user can act as, even if they are not added as full mailboxes in Outlook (see the VirtualMailboxConfigFile parameter for details).

πŸ”—Step 2: Make signatures available

  • Client mode automatically updates the local Outlook signature store.
  • SimulateAndDeploy has no access to end user devices and therefore treats Outlook for the web as the β€œlocal Outlook”.

With the Benefactor Circle add-on active, both modes can additionally make signatures available via multiple channels:

  • Outlook for the web: On-prem supports one signature (new email preferred). Cloud combines with roaming signatures.
  • Roaming Signatures;: Exchange Online feature; stores multiple signatures in the mailbox.
  • Outlook Add-in: For Android, iOS, and unmanaged BYOD devices; automatic signature selection based on sender and rules.
  • Draft Email: Universal compatibility via copy-paste; stores all signatures in HTML and plain text in Drafts.
  • Documents Folder: Exports signatures to a local path (e.g. OneDrive-synced) for easy access in non-Outlook clients.

πŸ”—Requirements and usage

πŸ’»

Core requirements

Exchange: Exchange Online, Exchange on-premises, or Exchange hybrid

PowerShell: PowerShell 5.1 (powershell.exe) on Windows, or PowerShell 7+ (pwsh.exe) cross-platform

πŸ“

Outlook and Word (Windows)

On Windows, Outlook and Word are usually required:

  • Outlook/New Outlook/OWA used as mailbox source.
  • Word 2010+ required for DOCX templates or RTF signatures.
πŸ“„

Templates

Supported template formats:

  • DOCX (Windows)
  • HTM (Windows, Linux, macOS)

Set-OutlookSignatures ships with sample templates in both formats.

πŸš€

Execution environment

The software must run in PowerShell Full Language mode.

On Windows and macOS, unblock Set-OutlookSignatures.ps1 if needed (Unblock-File or file properties β†’ Unblock).

πŸ›‘οΈ

Endpoint security

If you use application control (AppLocker, Defender, CrowdStrike, …), you may need to trust the existing digital file signature or allow execution/library loading from TEMP locations.

Set-OutlookSignatures and its components are digitally signed with an EV Code Signing Certificate.

πŸ“‚

File access

Paths to templates and config must be readable by the logged-in user.

For SharePoint Online access, register an Entra ID app and grant admin consent (see Quickstart).

πŸ”—Linux and macOS

Not all features are yet available or possible on Linux and macOS. Every parameter contains appropriate information; the most important restrictions are summarized here.

❗

Common restrictions and notes for Linux and macOS

  • Only mailboxes hosted in Exchange Online supported reliably.
  • Only Graph is supported (GraphOnly is effectively true).
  • Templates must be in HTM format (UseHtmTemplates is true).
  • Only existing mount points and SharePoint paths can be accessed.
  • Non-Outlook clients supported via AdditionalSignaturePath.
  • OWA support requires the Benefactor Circle add-on.

πŸ”—Security considerations

The security model of Set-OutlookSignatures and the Benefactor Circle add-on is built on the principles of Digital Sovereignty, Least Privilege, and Need to Know.

  • In client mode for on-premises mailboxes, no additional permissions or Graph registrations are required.
  • In Exchange Online, permissions are limited to the required Graph endpoints.
Permission Client mode SimulateAndDeploy Outlook add‑in Required for
All environments
Temporary full access to mailboxes ● Required Access to roaming signatures in Exchange Online. Direct-to-mailbox sync on-prem.
Add-in manifest, ReadWriteMailbox ● Required Set signature.
Cloud only Entra ID app (creating a separate app for each mode is strongly recommended)
Setup
Manual setup Graph config file SimulateAndDeploy Outlook add-in
Scripted setup Create-EntraApp.ps1 Create-EntraApp.ps1 Create-EntraApp.ps1
Graph API permissions, delegated
email ● Required ● Required Authenticate the signed-in user.
Files.Read.All β—‹ Optional β—‹ Optional Read template and configuration files hosted on SharePoint Online. Alternative: Files.SelectedOperations.Selected.
GroupMember.Read.All ● Required ● Required ● Required Find groups by name, get their security identifier (SID) and transitive members.
Mail.Read ● Required Required because of Microsoft restrictions accessing roaming signatures.
Mail.ReadWrite ● Required ● Required Create signature collection in drafts, provide signatures for Outlook add-in.
MailboxConfigItem.ReadWrite ● Required ● Required Read data from Outlook Web, set Outlook web signatures.
MailboxSettings.ReadWrite ● Required ● Required Detect mailbox environment, get and set out-of-office data.
offline_access ● Required ● Required Get a refresh token from Graph.
openid ● Required ● Required Authenticate the signed-in user.
profile ● Required ● Required Authenticate the signed-in user, get basic properties.
User.Read.All ● Required ● Required ● Required Data for replacement variables, SMTP to UPN, group membership.
Graph API permissions, application
Files.Read.All β—‹ Optional Read template and configuration files hosted on SharePoint Online. Alternative: Files.SelectedOperations.Selected.
GroupMember.Read.All ● Required Find groups by name, get their security identifier (SID) and transitive members.
Mail.ReadWrite ● Required Create signature collection in drafts, provide signatures for Outlook add-in.
MailboxConfigItem.ReadWrite ● Required Read data from Outlook Web, set Outlook web signatures.
MailboxSettings.ReadWrite ● Required Detect mailbox environment, get and set out-of-office data.
User.Read.All ● Required Data for replacement variables, SMTP to UPN, group membership.

πŸ”—Signature and OOF template file format

Word DOCX files or HTML files with extension .htm.

The name of the signature template file without extension is the name of the signature in Outlook: The template Test signature.docx becomes the signature with the name Test signature. This can be overridden in the INI file with OutlookSignatureName:

[Test signature.htm]
OutlookSignatureName = Test signature, do not use

πŸ”—Proposed template and signature naming convention

A consistent naming convention helps both template maintainers and end users. One popular approach:

  • Company
  • Internal/External (int/ext)
  • Language (two-letter code)
  • Formal/Informal (frml/infrml)
  • Optional mailbox hint (shared/delegate)

This is a recommendation; choose what fits your organization best.

πŸ”—Replacement variables

Replacement variables are case-insensitive placeholders in templates that are replaced with user or mailbox values at runtime.

  • Replacement happens everywhere, including hyperlinks and image alternative text.
  • Variables can come from Active Directory, Entra ID (Graph), or any custom source via script logic.
  • Custom variables are supported via a custom replacement variable config file.

Replacement variables do not just provide static text values, they can deliver dynamic content based on freely definable conditions and even influence the design of your signature. Examples are conditional banners, conditional texts, or account pictures.

Each replacement variable is available in four namespaces:

Current user

Attributes of the person currently logged into the device.

User's manager

Allows "Assistant to..." or "Escalate to..." dynamic links.

Current mailbox

Attributes of the mailbox (e.g. Shared Mailbox) being processed.

Mailbox manager

Attributes of the manager assigned to the specific mailbox.

Set-OutlookSignatures comes with a big set of default replacement variables, covering more than most companies ever need for their signatures. Instead of providing a long list here, we provide the Test all default replacement variables signature, which not only shows all placeholders but also account pictures, conditional banners, QR codes and more. There are three ways to get there:

πŸ”—Photos (account pictures, user image) from Active Directory or Entra ID

The software supports replacing images in signature templates with actual user photos. These photos are per default taken from Entra ID and Active Directory, but you may also definitive alternative sources such as a file share, a SharePoint document library, a database, or a web service.

As with other variables, photos can be obtained from the currently logged-in user, its manager, the currently processed mailbox and its manager.

Set-Outlooksignatures comes with the following default replacement variables for handling account pictures:

  • $CurrentUserPhoto$
  • $CurrentUserPhotoDeleteEmpty$
  • $CurrentUserManagerPhoto$
  • $CurrentUserManagerPhotoDeleteEmpty$
  • $CurrentMailboxPhoto$
  • $CurrentMailboxPhotoDeleteEmpty$
  • $CurrentMailboxManagerPhoto$
  • $CurrentMailboxManagerPhotoDeleteEmpty$

Note: Exchange and Outlook do not yet support images in OOF messages.

Adding account pictures is simple:

  • When using DOCX template files
    1. Add a shape or a placeholder image.
    2. Set its text wrapping to "inline with text".
    3. Apply Word image features such as sizing, hadow, glow or reflection.
    4. Add one of the account pictures replacement variables, such as $CurrentUserPhoto$, to the alternative text of the image or shape.
  • Whe using HTML template files
    1. Just add an account picture replacement variable to the the src or alt property of a placeholder image.

Set-OutlookSignatures take care of replacing the placeholder image or filling the shape with the desired account picture.

If you choose the "DeleteEmpty" option (e.g $CurrentUserPhotoDeleteEmpty$), the image or shape is deleted if there is no account picture available.

πŸ”—INI files and template tags

INI files are an easy way to define which templates are to be used for which mailboxes, groups or users.

Template tags define properties for templates, such as:

  • Time ranges during which a template shall be applied or not applied
  • Groups whose direct or indirect members are allowed or denied application of a template
  • Mailbox email addresses which are allowed or denied application of a template
  • Replacement-variable conditions that allow or deny application of a template
  • Default signature selection for new mails and reply/forward
  • OOF template target (internal/external)

Why INI (or TOML-style) configuration? We avoid modern formats like XML, YAML, or JSON because they rely on strict syntax (brackets, significant whitespace, commas) that is easily broken by non-IT staff. INI-style keeps common cases simple, human-readable, and easy to maintain without specialized database infrastructure.

Set-OutlookSignatures comes with an INI editor (.\sample code\IniEditor.html or set-outlooksignatures.com/inieditor) offering a much more than just editing:

  • A single HTML file that runs locally, from a file share, or hosted on a web server.
  • Create or modify signature and out-of-office (OOF) configuration files with ease.
  • Integrated documentation provides a clear explanation for every line and setting in the INI file.
  • Detects errors based on technical syntax and years of real-world support experience from the support teams of Set-OutlookSignatures and the Benefactor Circle add-on.
  • Visualizes the exact processing order the engine will use for templates.
  • Includes undo/redo history, dark/light mode, mobile/touch support, and automatic input file encoding detection.

πŸ”—Allowed tags (common cases)

The following list focuses on the tags that are used most often.

  • Time range: 202401010000-202401312359
    Use -: prefix to deny a time range: -:202402010000-202402282359
    Add Z to interpret as UTC: 202401010000Z-202401312359Z
  • Group assignment: <Environment> <Group Name>
    Assign a template to mailboxes that are (direct or indirect) members of this group.
    When using the -GraphOnly true parameter, prefer Entra ID groups (EntraID <Group Name>), you can also use on-prem groups (<DNS or NetBIOS name of AD domain> <Group Name>).
    Use -: prefix to deny a group: -:<Environment> <Group Name>
  • Mailbox email address: office@example.com
    Assign a template to a specific mailbox; use -: to deny: -:test@example.com
  • Replacement variable condition: $SomeVariable$
    Apply only when the variable evaluates to true. Use -: to deny: -:$SomeVariable$
  • Write protect (Windows Classic Outlook only): writeProtect
  • Default signature: defaultNew, defaultReplyFwd
  • OOF scope: internal, external

For a complete reference and examples based on real-world use cases, see the INI files in the sample templates folder.

Note: Tags are case-insensitive.

πŸ”—How to work with INI files

  1. Comments: lines starting with # or ;
  2. Use the sample INI files shipped with Set-OutlookSignatures as a starting point (see sample templates folder)
  3. Put file names (with extension) in square brackets:
     [Company external English formal.docx]
     defaultNew
    
  4. One tag per line below the file section header.
  5. When using INI files, tags in filenames are treated as part of the name, not as tags.
  6. Use parameters to point to the INI file:

Set-OutlookSignatures comes with an INI editor (.\sample code\IniEditor.html or set-outlooksignatures.com/inieditor) offering a much more than just editing:

  • A single HTML file that runs locally, from a file share, or hosted on a web server.
  • Create or modify signature and out-of-office (OOF) configuration files with ease.
  • Integrated documentation provides a clear explanation for every line and setting in the INI file.
  • Detects errors based on technical syntax and years of real-world support experience from the support teams of Set-OutlookSignatures and the Benefactor Circle add-on.
  • Visualizes the exact processing order the engine will use for templates.
  • Includes undo/redo history, dark/light mode, mobile/touch support, and automatic input file encoding detection.

πŸ”—Signature and OOF application order

Set-OutlookSignatures knows which mailboxes a user added to Outlook, and in which order they are sorted. Signatures are applied mailbox by mailbox in this order.

Mailbox priority

  1. Primary logged-in user mailbox
  2. Default Outlook profile mailboxes
  3. Other Outlook profiles (alphabetical)

Template priority

  1. Common templates
  2. Group templates
  3. Email-address templates
  4. Variable-condition templates

Within each group, templates are sorted by SortOrder and SortCulture (if defined in the INI file).

Important consequence: A template is applied only to the mailbox with the highest priority allowed to use it, so lower-priority mailboxes do not overwrite signatures intended for higher-priority ones.

You can influence behavior with the MailboxSpecificSignatureNames parameter and with the OutlookSignatureName tag in the INI file.

OOF templates are applied only if the out-of-office assistant is currently disabled. If it is active or scheduled, OOF templates are not applied.

πŸ”—Simulation mode

Simulation mode is enabled when the parameter SimulateUser is passed. It answers the question:

β€œWhat will the signatures look like for user A, when Outlook is configured for the mailboxes X, Y and Z?”

In simulation mode:

  • Outlook registry entries are not considered
  • Nothing is changed in Outlook or Outlook for the web
  • Resulting signatures are written to the path defined by AdditionalSignaturePath

Minimal example:

& .\Set-OutlookSignatures.ps1 -SimulateUser "a@example.com" -SimulateMailboxes "a@example.com", "x@example.com" -AdditionalSignaturePath "c:\test"

SimulateMailboxes is optional but highly recommended.
SimulateTime can be used to test time-based templates.
See .\sample code\SimulationModeHelper.ps1 for helper logic.