en-US office user

Security setting for macros

Verified with Microsoft 365/Office 5568.1000 — updated on September 4, 2026

Microsoft 365/Office 5568.1000

Supported on: At least Windows Server 2008 R2 or Windows 7

Path in the GPO console

User Configuration\Administrative Templates\Microsoft Outlook 2016\Security\Trust Center

Description

This policy setting controls the security level for macros in Outlook. If you enable this policy setting, you can choose from four options for handling macros in Outlook: - Always warn. This option corresponds to the "Notifications for all macros" option in the "Macro Settings" section of the Outlook Trust Center. Outlook disables all macros that are not opened from a trusted location, even if the macros are signed by a trusted publisher. For each disabled macro, Outlook displays a security alert dialog box with information about the macro and its digital signature (if present), and allows users to enable the macro or leave it disabled. - Never warn, disable all. This option corresponds to the "Disable all macros without notification" option in the Trust Center. Outlook disables all macros that are not opened from trusted locations, and does not notify users. - Warning for signed, disable unsigned. This option corresponds to the "Notifications for digitally signed macros, all other macros disabled" option in the Trust Center. Outlook handles macros as follows: --If a macro is digitally signed by a trusted publisher, the macro can run if the user has already trusted the publisher. --If a macro has a valid signature from a publisher that the user has not trusted, the security alert dialog box for the macro lets the user choose whether to enable the macro for the current session, disable the macro for the current session, or to add the publisher to the Trusted Publishers list so that it will run without prompting the user in the future. --If a macro does not have a valid signature, Outlook disables it without prompting the user, unless it is opened from a trusted location. This option is the default configuration in Outlook. - No security check. This option corresponds to the "Enable all macros (not recommended; potentially dangerous code can run)" option in the Trust Center. Outlook runs all macros without prompting users. This configuration makes users' computers vulnerable to potentially malicious code and is not recommended. If you disable or do not configure this policy setting, the behavior is the equivalent of Enabled -- Warning for signed, disable unsigned.

Registry

HKCU software\policies\microsoft\office\16.0\outlook\security

More options available

Options

Security Level
level enum
  • Always warn -> 2 (default)
  • Never warn, disable all -> 4
  • Warn for signed, disable unsigned -> 3
  • No security check -> 1

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO.

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Security setting for macros
; State: Enabled
; Supported on: At least Windows Server 2008 R2 or Windows 7

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\outlook\security]
"level"=dword:00000002
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Security setting for macros
# State: Enabled
# Supported on: At least Windows Server 2008 R2 or Windows 7
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.

$path = 'HKCU:\software\policies\microsoft\office\16.0\outlook\security'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'level' -Value 2 -Type DWord

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview