Bereik voor runtimescan van macro's: registerwaarde macroruntimescanscopeGebruikerHKCU\software\policies\microsoft\office\16.0\common\security

Beleids-ID
L_MacroRuntimeScanScope
Bereik
Gebruikersconfiguratie
Ondersteund op
Minimaal Windows Server 2016, Windows 10
Bron
Microsoft 365 Apps / Office Administrative Templates (versie 5568.1000)
Categorie
Microsoft Office 2016 › Beveiligingsinstellingen

Register

macroruntimescanscope

REG_DWORDGebruiker
Waarde bij ingeschakeld
Afhankelijk van de waarde van de optie
Element
-
Opties
ItemOpgeslagen waarde
Uitschakelen voor alle documenten0
Inschakelen voor documenten met laag vertrouwensniveau1
Inschakelen voor alle documenten2
Scan excluding documents marked as trusted by an admin3
Toepassen met .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common\security]

; Opties (gebruik er maar één)
; Uitschakelen voor alle documenten
"macroruntimescanscope"=dword:00000000
; Inschakelen voor documenten met laag vertrouwensniveau
"macroruntimescanscope"=dword:00000001
; Inschakelen voor alle documenten
"macroruntimescanscope"=dword:00000002
; Scan excluding documents marked as trusted by an admin
"macroruntimescanscope"=dword:00000003
CMD
:: Opties (gebruik er maar één)

:: Uitschakelen voor alle documenten
reg add "HKCU\software\policies\microsoft\office\16.0\common\security" /v "macroruntimescanscope" /t REG_DWORD /d 0 /f
:: Inschakelen voor documenten met laag vertrouwensniveau
reg add "HKCU\software\policies\microsoft\office\16.0\common\security" /v "macroruntimescanscope" /t REG_DWORD /d 1 /f
:: Inschakelen voor alle documenten
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
# Algemeen: sleutel maken
New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\common\security' -Force | Out-Null

# Opties (gebruik er maar één)
# Uitschakelen voor alle documenten
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\common\security' -Name 'macroruntimescanscope' -PropertyType DWord -Value 0 -Force | Out-Null
# Inschakelen voor documenten met laag vertrouwensniveau
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\common\security' -Name 'macroruntimescanscope' -PropertyType DWord -Value 1 -Force | Out-Null
# Inschakelen voor alle documenten
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