Macro Runtime Scan Scope: registry value macroruntimescanscopeUserHKCU\software\policies\microsoft\office\16.0\common\security
- Policy ID
- L_MacroRuntimeScanScope
- Scope
- User Configuration
- Supported on
- At least Windows Server 2016, Windows 10
- Source
- Microsoft 365 Apps / Office Administrative Templates (version 5568.1000)
- Category
- Microsoft Office 2016 › Security Settings
Registry
macroruntimescanscope
REG_DWORDUser- Enabled value
- Depends on the option value
- Element
- -
| Item | Stored value |
|---|---|
| Disable for all documents | 0 |
| Enable for low trust documents | 1 |
| Enable for all documents | 2 |
| Scan excluding documents marked as trusted by an admin | 3 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common\security] ; Options (use only one) ; Disable for all documents "macroruntimescanscope"=dword:00000000 ; Enable for low trust documents "macroruntimescanscope"=dword:00000001 ; Enable for all documents "macroruntimescanscope"=dword:00000002 ; Scan excluding documents marked as trusted by an admin "macroruntimescanscope"=dword:00000003
CMD
:: Options (use only one) :: Disable for all documents reg add "HKCU\software\policies\microsoft\office\16.0\common\security" /v "macroruntimescanscope" /t REG_DWORD /d 0 /f :: Enable for low trust documents reg add "HKCU\software\policies\microsoft\office\16.0\common\security" /v "macroruntimescanscope" /t REG_DWORD /d 1 /f :: Enable for all documents reg add "HKCU\software\policies\microsoft\office\16.0\common\security" /v "macroruntimescanscope" /t REG_DWORD /d 2 /f :: Scan excluding documents marked as trusted by an admin reg add "HKCU\software\policies\microsoft\office\16.0\common\security" /v "macroruntimescanscope" /t REG_DWORD /d 3 /f
PowerShell
# Common: create the key New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\common\security' -Force | Out-Null # Options (use only one) # Disable for all documents New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\common\security' -Name 'macroruntimescanscope' -PropertyType DWord -Value 0 -Force | Out-Null # Enable for low trust documents New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\common\security' -Name 'macroruntimescanscope' -PropertyType DWord -Value 1 -Force | Out-Null # Enable for all documents New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\common\security' -Name 'macroruntimescanscope' -PropertyType DWord -Value 2 -Force | Out-Null # Scan excluding documents marked as trusted by an admin New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\common\security' -Name 'macroruntimescanscope' -PropertyType DWord -Value 3 -Force | Out-Null