Office Admin Explorer

Excel am Ausführen von XLM-Makros hindern

Registrierungswert
xl4macrooff
GruppenrichtlinieExcel am Ausführen von XLM-Makros hindern
Englische VersionPrevent Excel from running XLM macros
Intune-EinstellungskatalogPrevent Excel from running XLM macros (User)
BereichBenutzer · HKCU
ADMXexcel16.admx · L_XL4KillSwitchPolicy
Im interaktiven Explorer öffnen+ Zur Sammlung

Pfad der Gruppenrichtlinie

Benutzerkonfiguration\Richtlinien\Administrative Vorlagen\Microsoft Excel 2016\Excel-Optionen\Sicherheit\Trust Center
User Configuration\Policies\Administrative Templates\Microsoft Excel 2016\Excel Options\Security\Trust Center

Registrierung

WertDaten
HKCU\Software\policies\microsoft\office\16.0\excel\security
xl4macrooffEnabled = 1 · Disabled = 0

Nicht konfiguriert = der Wert existiert nicht – es gilt der Standard der Anwendung, Benutzer dürfen die Einstellung ändern.

PowerShell

Aktuellen Wert prüfen (nur lesen)

# --- Settings ---
$root = 'HKCU:'   # other signed-in user (elevated): 'Registry::HKEY_USERS\<SID>'

$key = "$root\Software\policies\microsoft\office\16.0\excel\security"
foreach ($name in @('xl4macrooff')) {
    try   { '{0} = {1}' -f $name, (Get-ItemPropertyValue -Path $key -Name $name -ErrorAction Stop) }
    catch { '{0}: not configured' -f $name }
}

Adminrechte nötig: HKCU\Software\Policies ist für Standardbenutzer schreibgeschützt. Eine erhöhte Sitzung schreibt in das HKCU des Admins – für einen anderen angemeldeten Benutzer $root auf Registry::HKEY_USERS\<SID> ändern.

Aktivieren

# --- Settings ---
$root = 'HKCU:'   # other signed-in user (elevated): 'Registry::HKEY_USERS\<SID>'

try {
    $key = "$root\Software\policies\microsoft\office\16.0\excel\security"
    if (-not (Test-Path $key)) { New-Item -Path $key -Force -ErrorAction Stop | Out-Null }
    New-ItemProperty -Path $key -Name 'xl4macrooff' -PropertyType DWord -Value 1 -Force -ErrorAction Stop | Out-Null   # Enabled
    'Done.'
}
catch { Write-Error "Failed: $($_.Exception.Message)" }
Deaktivieren
# --- Settings ---
$root = 'HKCU:'   # other signed-in user (elevated): 'Registry::HKEY_USERS\<SID>'

try {
    $key = "$root\Software\policies\microsoft\office\16.0\excel\security"
    if (-not (Test-Path $key)) { New-Item -Path $key -Force -ErrorAction Stop | Out-Null }
    New-ItemProperty -Path $key -Name 'xl4macrooff' -PropertyType DWord -Value 0 -Force -ErrorAction Stop | Out-Null   # Disabled
    'Done.'
}
catch { Write-Error "Failed: $($_.Exception.Message)" }
Auf „Nicht konfiguriert“ zurücksetzen
# --- Settings ---
$root = 'HKCU:'   # other signed-in user (elevated): 'Registry::HKEY_USERS\<SID>'

$key = "$root\Software\policies\microsoft\office\16.0\excel\security"
Remove-ItemProperty -Path $key -Name 'xl4macrooff' -ErrorAction SilentlyContinue
'Policy values removed (Not configured).'

Intune (Einstellungskatalog)

Prevent Excel from running XLM macros (User)

Einstellungskatalog → Einstellungen hinzufügen → nach dem Namen oben suchen.

Intune Settings Catalog Viewer ↗

Alternative: benutzerdefiniertes Profil (OMA-URI)
OMA-URI
./User/Vendor/MSFT/Policy/Config/excel16v6~Policy~L_MicrosoftOfficeExcel~L_ExcelOptions~L_Security~L_TrustCenter/L_XL4KillSwitchPolicy
DatentypString
Wert<enabled/> · <disabled/>

Cloud Policy

Cloud Policy (config.office.com → Anpassung → Richtlinienverwaltung) enthält viele Benutzerrichtlinien der Microsoft 365 Apps – suchen nach Prevent Excel from running XLM macros. Gilt auch auf nicht verwalteten Geräten und hat Vorrang vor GPO und Intune bei derselben Einstellung.

Erklärung von Microsoft

Diese Richtlinieneinstellung verhindert die Ausführung von Excel 4.0-Makros (XLM) in Excel.

Wenn Sie diese Richtlinieneinstellung aktivieren, können XLM-Makros nicht in Excel ausgeführt werden.

Wenn Sie diese Richtlinieneinstellung deaktivieren oder nicht konfigurieren, können XLM-Makros in Excel ausgeführt werden.

Gleiche Kategorie: Microsoft Excel 2016 › Excel-Optionen › Sicherheit › Trust Center

Alle Richtlinien dieser Kategorie · Alle 173 Richtlinien von excel16.admx